# Models

## The brands object

```json
{"openapi":"3.0.1","info":{"title":"Brand Service","version":"0.0.1"},"components":{"schemas":{"brands":{"title":"Collection of Brands","type":"array","items":{"$ref":"#/components/schemas/brandResponse"}},"brandResponse":{"title":"Brand Response","type":"object","properties":{"name":{"type":"string","description":"Brand name."},"cloudinaryUrl":{"type":"string","description":"Id of the associated media file."},"description":{"type":"string","description":"Brand description."},"localizedName":{"type":"object","description":"Map of key-value pairs containing localized names of the brand.","additionalProperties":{"type":"string"}},"localizedDescription":{"type":"object","description":"Map of key-value pairs containing localized descriptions of the brand.","additionalProperties":{"type":"string"}},"image":{"type":"string","description":"Link to the associated media file."},"mediaId":{"type":"string","description":"Id of the media."},"id":{"type":"string","description":"Unique identifier of a brand."},"metadata":{"$ref":"#/components/schemas/metaData"}}},"metaData":{"title":"Metadata","type":"object","properties":{"createdAt":{"type":"string","description":"Date and time when the object was created compliant with the ISO 8601 standard."},"modifiedAt":{"type":"string","description":"Date and time when the object was last modified compliant with the ISO 8601 standard."},"version":{"minimum":1,"type":"integer","description":"Object version."}}}}}}
```

## The brand object

```json
{"openapi":"3.0.1","info":{"title":"Brand Service","version":"0.0.1"},"components":{"schemas":{"brand":{"title":"Brand","type":"object","properties":{"id":{"type":"string","description":"Unique identifier of a brand."},"name":{"type":"string","description":"Brand name."},"description":{"type":"string","description":"Brand description."},"localizedName":{"type":"object","description":"Map of key-value pairs containing localized names of the brand.","additionalProperties":{"type":"string"}},"localizedDescription":{"type":"object","description":"Map of key-value pairs containing localized descriptions of the brand.","additionalProperties":{"type":"string"}}}}}}}
```

## The updateBrand object

```json
{"openapi":"3.0.1","info":{"title":"Brand Service","version":"0.0.1"},"components":{"schemas":{"updateBrand":{"title":"Brand","type":"object","properties":{"name":{"type":"string","description":"Brand name."},"description":{"type":"string","description":"Brand description."},"localizedName":{"type":"object","description":"Map of key-value pairs containing localized names of the brand.","additionalProperties":{"type":"string"}},"localizedDescription":{"type":"object","description":"Map of key-value pairs containing localized descriptions of the brand.","additionalProperties":{"type":"string"}},"metadata":{"$ref":"#/components/schemas/updateMetaData"}}},"updateMetaData":{"title":"Metadata","type":"object","properties":{"version":{"minimum":1,"type":"integer","description":"Object version."}}}}}}
```

## The brandResponse object

```json
{"openapi":"3.0.1","info":{"title":"Brand Service","version":"0.0.1"},"components":{"schemas":{"brandResponse":{"title":"Brand Response","type":"object","properties":{"name":{"type":"string","description":"Brand name."},"cloudinaryUrl":{"type":"string","description":"Id of the associated media file."},"description":{"type":"string","description":"Brand description."},"localizedName":{"type":"object","description":"Map of key-value pairs containing localized names of the brand.","additionalProperties":{"type":"string"}},"localizedDescription":{"type":"object","description":"Map of key-value pairs containing localized descriptions of the brand.","additionalProperties":{"type":"string"}},"image":{"type":"string","description":"Link to the associated media file."},"mediaId":{"type":"string","description":"Id of the media."},"id":{"type":"string","description":"Unique identifier of a brand."},"metadata":{"$ref":"#/components/schemas/metaData"}}},"metaData":{"title":"Metadata","type":"object","properties":{"createdAt":{"type":"string","description":"Date and time when the object was created compliant with the ISO 8601 standard."},"modifiedAt":{"type":"string","description":"Date and time when the object was last modified compliant with the ISO 8601 standard."},"version":{"minimum":1,"type":"integer","description":"Object version."}}}}}}
```

## The metaData object

```json
{"openapi":"3.0.1","info":{"title":"Brand Service","version":"0.0.1"},"components":{"schemas":{"metaData":{"title":"Metadata","type":"object","properties":{"createdAt":{"type":"string","description":"Date and time when the object was created compliant with the ISO 8601 standard."},"modifiedAt":{"type":"string","description":"Date and time when the object was last modified compliant with the ISO 8601 standard."},"version":{"minimum":1,"type":"integer","description":"Object version."}}}}}}
```

## The updateMetaData object

```json
{"openapi":"3.0.1","info":{"title":"Brand Service","version":"0.0.1"},"components":{"schemas":{"updateMetaData":{"title":"Metadata","type":"object","properties":{"version":{"minimum":1,"type":"integer","description":"Object version."}}}}}}
```

## The error object

```json
{"openapi":"3.0.1","info":{"title":"Brand Service","version":"0.0.1"},"components":{"schemas":{"error":{"title":"error","required":["status","code","message"],"type":"object","properties":{"code":{"maximum":599,"minimum":100,"type":"integer","description":"Original HTTP error code, should be consistent with the response HTTP code."},"status":{"type":"string","description":"HTTP status"},"errorCode":{"type":"string","description":"Code of the error"},"resourceId":{"type":"string","description":"Id of the resource"},"message":{"type":"string","description":"Descriptive error message for debugging."},"details":{"type":"array","description":"List of problems causing this error.","items":{"title":"errorDetail","oneOf":[{"type":"string","description":"detailed exception message"},{"type":"object","properties":{"field":{"type":"string","description":"A bean notation expression specifying the element in the request data that causes the error, for example `product.variants[3].name`. This field may be empty if the violation was not field-specific."},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","type":"string","description":"Classification of the error detail type, provided in lower case with underscore, for example missing_value. This value must always be interpreted in the context of the general error type."},"message":{"type":"string","description":"Descriptive and detailed message for debugging."},"moreInfo":{"type":"string","description":"Link to documentation."}},"description":"Schema for the specific error cause."}]}}},"description":"Schema for API-specific errors."}}}}
```
