/* tslint:disable */ /* eslint-disable */ /** * My API * API documentation for my Laravel app * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { mapValues } from '../runtime'; /** * * @export * @interface SearchModelAttributesRequest */ export interface SearchModelAttributesRequest { /** * * @type {string} * @memberof SearchModelAttributesRequest */ search?: string | null; /** * * @type {string} * @memberof SearchModelAttributesRequest */ sortBy?: SearchModelAttributesRequestSortByEnum; /** * * @type {string} * @memberof SearchModelAttributesRequest */ sortDirection?: SearchModelAttributesRequestSortDirectionEnum; /** * * @type {number} * @memberof SearchModelAttributesRequest */ perPage?: number; /** * * @type {number} * @memberof SearchModelAttributesRequest */ page?: number; /** * * @type {Array} * @memberof SearchModelAttributesRequest */ attributableType?: Array; /** * * @type {Array} * @memberof SearchModelAttributesRequest */ attributableId?: Array; /** * * @type {Array} * @memberof SearchModelAttributesRequest */ attributeId?: Array; /** * * @type {number} * @memberof SearchModelAttributesRequest */ relatedId?: number; /** * * @type {string} * @memberof SearchModelAttributesRequest */ relatedType?: SearchModelAttributesRequestRelatedTypeEnum; /** * * @type {boolean} * @memberof SearchModelAttributesRequest */ includesRelations?: boolean; } /** * @export */ export const SearchModelAttributesRequestSortByEnum = { Id: 'id', AttributeId: 'attribute_id', CreatedAt: 'created_at', AttributeName: 'attribute-name' } as const; export type SearchModelAttributesRequestSortByEnum = typeof SearchModelAttributesRequestSortByEnum[keyof typeof SearchModelAttributesRequestSortByEnum]; /** * @export */ export const SearchModelAttributesRequestSortDirectionEnum = { Asc: 'asc', Desc: 'desc' } as const; export type SearchModelAttributesRequestSortDirectionEnum = typeof SearchModelAttributesRequestSortDirectionEnum[keyof typeof SearchModelAttributesRequestSortDirectionEnum]; /** * @export */ export const SearchModelAttributesRequestRelatedTypeEnum = { Category: 'category', ProductRange: 'productRange' } as const; export type SearchModelAttributesRequestRelatedTypeEnum = typeof SearchModelAttributesRequestRelatedTypeEnum[keyof typeof SearchModelAttributesRequestRelatedTypeEnum]; /** * Check if a given object implements the SearchModelAttributesRequest interface. */ export function instanceOfSearchModelAttributesRequest(value: object): value is SearchModelAttributesRequest { return true; } export function SearchModelAttributesRequestFromJSON(json: any): SearchModelAttributesRequest { return SearchModelAttributesRequestFromJSONTyped(json, false); } export function SearchModelAttributesRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SearchModelAttributesRequest { if (json == null) { return json; } return { 'search': json['search'] == null ? undefined : json['search'], 'sortBy': json['sortBy'] == null ? undefined : json['sortBy'], 'sortDirection': json['sortDirection'] == null ? undefined : json['sortDirection'], 'perPage': json['per_page'] == null ? undefined : json['per_page'], 'page': json['page'] == null ? undefined : json['page'], 'attributableType': json['attributable_type'] == null ? undefined : json['attributable_type'], 'attributableId': json['attributable_id'] == null ? undefined : json['attributable_id'], 'attributeId': json['attribute_id'] == null ? undefined : json['attribute_id'], 'relatedId': json['related_id'] == null ? undefined : json['related_id'], 'relatedType': json['related_type'] == null ? undefined : json['related_type'], 'includesRelations': json['includes_relations'] == null ? undefined : json['includes_relations'], }; } export function SearchModelAttributesRequestToJSON(json: any): SearchModelAttributesRequest { return SearchModelAttributesRequestToJSONTyped(json, false); } export function SearchModelAttributesRequestToJSONTyped(value?: SearchModelAttributesRequest | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'search': value['search'], 'sortBy': value['sortBy'], 'sortDirection': value['sortDirection'], 'per_page': value['perPage'], 'page': value['page'], 'attributable_type': value['attributableType'], 'attributable_id': value['attributableId'], 'attribute_id': value['attributeId'], 'related_id': value['relatedId'], 'related_type': value['relatedType'], 'includes_relations': value['includesRelations'], }; }