@simplyhomes/sos-sdk
Version:
TypeScript SDK for Simply Homes SoS API v4
53 lines (52 loc) • 2.38 kB
JavaScript
/* 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 V4ViewsViewDataDto interface.
*/
export function instanceOfV4ViewsViewDataDto(value) {
return true;
}
export function V4ViewsViewDataDtoFromJSON(json) {
return V4ViewsViewDataDtoFromJSONTyped(json, false);
}
export function V4ViewsViewDataDtoFromJSONTyped(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 V4ViewsViewDataDtoToJSON(json) {
return V4ViewsViewDataDtoToJSONTyped(json, false);
}
export function V4ViewsViewDataDtoToJSONTyped(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)),
};
}