/* 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 UpdateAttributeRequest */ export interface UpdateAttributeRequest { /** * * @type {string} * @memberof UpdateAttributeRequest */ name: string; /** * * @type {string} * @memberof UpdateAttributeRequest */ type: UpdateAttributeRequestTypeEnum; /** * * @type {boolean} * @memberof UpdateAttributeRequest */ isFilterable: boolean; /** * * @type {boolean} * @memberof UpdateAttributeRequest */ isExpandedByDefault: boolean; /** * * @type {number} * @memberof UpdateAttributeRequest */ filterIndex?: number; } /** * @export */ export const UpdateAttributeRequestTypeEnum = { Select: 'select', MultiSelect: 'multi_select', Text: 'text' } as const; export type UpdateAttributeRequestTypeEnum = typeof UpdateAttributeRequestTypeEnum[keyof typeof UpdateAttributeRequestTypeEnum]; /** * Check if a given object implements the UpdateAttributeRequest interface. */ export function instanceOfUpdateAttributeRequest(value: object): value is UpdateAttributeRequest { if (!('name' in value) || value['name'] === undefined) return false; if (!('type' in value) || value['type'] === undefined) return false; if (!('isFilterable' in value) || value['isFilterable'] === undefined) return false; if (!('isExpandedByDefault' in value) || value['isExpandedByDefault'] === undefined) return false; return true; } export function UpdateAttributeRequestFromJSON(json: any): UpdateAttributeRequest { return UpdateAttributeRequestFromJSONTyped(json, false); } export function UpdateAttributeRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateAttributeRequest { if (json == null) { return json; } return { 'name': json['name'], 'type': json['type'], 'isFilterable': json['is_filterable'], 'isExpandedByDefault': json['is_expanded_by_default'], 'filterIndex': json['filter_index'] == null ? undefined : json['filter_index'], }; } export function UpdateAttributeRequestToJSON(json: any): UpdateAttributeRequest { return UpdateAttributeRequestToJSONTyped(json, false); } export function UpdateAttributeRequestToJSONTyped(value?: UpdateAttributeRequest | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'name': value['name'], 'type': value['type'], 'is_filterable': value['isFilterable'], 'is_expanded_by_default': value['isExpandedByDefault'], 'filter_index': value['filterIndex'], }; }