UNPKG

@simplyhomes/sos-sdk

Version:

TypeScript SDK for Simply Homes SoS API v4

53 lines (52 loc) 2.45 kB
/* tslint:disable */ /* eslint-disable */ /** * API v4 * Swagger documentation for API v4 * * The version of the OpenAPI document: 4.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 { SoSViewEntityDataSortFromJSON, SoSViewEntityDataSortToJSON, } from './SoSViewEntityDataSort'; import { SoSViewEntityDataRelationFromJSON, SoSViewEntityDataRelationToJSON, } from './SoSViewEntityDataRelation'; import { SoSViewEntityDataColumnFromJSON, SoSViewEntityDataColumnToJSON, } from './SoSViewEntityDataColumn'; import { SoSViewEntityDataFilterFromJSON, SoSViewEntityDataFilterToJSON, } from './SoSViewEntityDataFilter'; /** * Check if a given object implements the V4ViewsValidateViewBodyDto interface. */ export function instanceOfV4ViewsValidateViewBodyDto(value) { return true; } export function V4ViewsValidateViewBodyDtoFromJSON(json) { return V4ViewsValidateViewBodyDtoFromJSONTyped(json, false); } export function V4ViewsValidateViewBodyDtoFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { ...json, // Preserve relation fields from views 'columns': json['columns'] == null ? undefined : (json['columns'].map(SoSViewEntityDataColumnFromJSON)), 'filters': json['filters'] == null ? undefined : (json['filters'].map(SoSViewEntityDataFilterFromJSON)), 'sorts': json['sorts'] == null ? undefined : (json['sorts'].map(SoSViewEntityDataSortFromJSON)), 'relations': json['relations'] == null ? undefined : (json['relations'].map(SoSViewEntityDataRelationFromJSON)), }; } export function V4ViewsValidateViewBodyDtoToJSON(json) { return V4ViewsValidateViewBodyDtoToJSONTyped(json, false); } export function V4ViewsValidateViewBodyDtoToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'columns': value['columns'] == null ? undefined : (value['columns'].map(SoSViewEntityDataColumnToJSON)), 'filters': value['filters'] == null ? undefined : (value['filters'].map(SoSViewEntityDataFilterToJSON)), 'sorts': value['sorts'] == null ? undefined : (value['sorts'].map(SoSViewEntityDataSortToJSON)), 'relations': value['relations'] == null ? undefined : (value['relations'].map(SoSViewEntityDataRelationToJSON)), }; }