/* 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 SearchDefinitionsRequest */ export interface SearchDefinitionsRequest { /** * * @type {string} * @memberof SearchDefinitionsRequest */ search?: string | null; /** * * @type {string} * @memberof SearchDefinitionsRequest */ sortBy?: SearchDefinitionsRequestSortByEnum; /** * * @type {string} * @memberof SearchDefinitionsRequest */ sortDirection?: SearchDefinitionsRequestSortDirectionEnum; /** * * @type {number} * @memberof SearchDefinitionsRequest */ perPage?: number; /** * * @type {number} * @memberof SearchDefinitionsRequest */ page?: number; /** * * @type {number} * @memberof SearchDefinitionsRequest */ relatedId?: number; /** * * @type {string} * @memberof SearchDefinitionsRequest */ relatedType?: string; /** * * @type {boolean} * @memberof SearchDefinitionsRequest */ includesRelations?: boolean; } /** * @export */ export const SearchDefinitionsRequestSortByEnum = { Id: 'id', Name: 'name', CreatedAt: 'created_at', UpdatedAt: 'updated_at' } as const; export type SearchDefinitionsRequestSortByEnum = typeof SearchDefinitionsRequestSortByEnum[keyof typeof SearchDefinitionsRequestSortByEnum]; /** * @export */ export const SearchDefinitionsRequestSortDirectionEnum = { Asc: 'asc', Desc: 'desc' } as const; export type SearchDefinitionsRequestSortDirectionEnum = typeof SearchDefinitionsRequestSortDirectionEnum[keyof typeof SearchDefinitionsRequestSortDirectionEnum]; /** * Check if a given object implements the SearchDefinitionsRequest interface. */ export function instanceOfSearchDefinitionsRequest(value: object): value is SearchDefinitionsRequest { return true; } export function SearchDefinitionsRequestFromJSON(json: any): SearchDefinitionsRequest { return SearchDefinitionsRequestFromJSONTyped(json, false); } export function SearchDefinitionsRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SearchDefinitionsRequest { 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'], '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 SearchDefinitionsRequestToJSON(json: any): SearchDefinitionsRequest { return SearchDefinitionsRequestToJSONTyped(json, false); } export function SearchDefinitionsRequestToJSONTyped(value?: SearchDefinitionsRequest | 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'], 'related_id': value['relatedId'], 'related_type': value['relatedType'], 'includes_relations': value['includesRelations'], }; }