/* 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 SearchAttributesRequest */ export interface SearchAttributesRequest { /** * * @type {string} * @memberof SearchAttributesRequest */ search?: string | null; /** * * @type {string} * @memberof SearchAttributesRequest */ sortBy?: SearchAttributesRequestSortByEnum; /** * * @type {string} * @memberof SearchAttributesRequest */ sortDirection?: SearchAttributesRequestSortDirectionEnum; /** * * @type {number} * @memberof SearchAttributesRequest */ perPage?: number; /** * * @type {number} * @memberof SearchAttributesRequest */ page?: number; /** * * @type {Array} * @memberof SearchAttributesRequest */ type?: Array; /** * * @type {Array} * @memberof SearchAttributesRequest */ isFilterable?: Array; /** * * @type {Array} * @memberof SearchAttributesRequest */ isExpandedByDefault?: Array; /** * * @type {number} * @memberof SearchAttributesRequest */ relatedId?: number; /** * * @type {string} * @memberof SearchAttributesRequest */ relatedType?: SearchAttributesRequestRelatedTypeEnum; /** * * @type {boolean} * @memberof SearchAttributesRequest */ includesRelations?: boolean; } /** * @export */ export const SearchAttributesRequestSortByEnum = { Id: 'id', Name: 'name', FilterIndex: 'filter_index', CreatedAt: 'created_at', UpdatedAt: 'updated_at' } as const; export type SearchAttributesRequestSortByEnum = typeof SearchAttributesRequestSortByEnum[keyof typeof SearchAttributesRequestSortByEnum]; /** * @export */ export const SearchAttributesRequestSortDirectionEnum = { Asc: 'asc', Desc: 'desc' } as const; export type SearchAttributesRequestSortDirectionEnum = typeof SearchAttributesRequestSortDirectionEnum[keyof typeof SearchAttributesRequestSortDirectionEnum]; /** * @export */ export const SearchAttributesRequestRelatedTypeEnum = { ProductType: 'productType', ProductRange: 'productRange', Category: 'category' } as const; export type SearchAttributesRequestRelatedTypeEnum = typeof SearchAttributesRequestRelatedTypeEnum[keyof typeof SearchAttributesRequestRelatedTypeEnum]; /** * Check if a given object implements the SearchAttributesRequest interface. */ export function instanceOfSearchAttributesRequest(value: object): value is SearchAttributesRequest { return true; } export function SearchAttributesRequestFromJSON(json: any): SearchAttributesRequest { return SearchAttributesRequestFromJSONTyped(json, false); } export function SearchAttributesRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SearchAttributesRequest { 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'], 'type': json['type'] == null ? undefined : json['type'], 'isFilterable': json['is_filterable'] == null ? undefined : json['is_filterable'], 'isExpandedByDefault': json['is_expanded_by_default'] == null ? undefined : json['is_expanded_by_default'], '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 SearchAttributesRequestToJSON(json: any): SearchAttributesRequest { return SearchAttributesRequestToJSONTyped(json, false); } export function SearchAttributesRequestToJSONTyped(value?: SearchAttributesRequest | 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'], 'type': value['type'], 'is_filterable': value['isFilterable'], 'is_expanded_by_default': value['isExpandedByDefault'], 'related_id': value['relatedId'], 'related_type': value['relatedType'], 'includes_relations': value['includesRelations'], }; }