@simplyhomes/sos-sdk
Version:
TypeScript SDK for Simply Homes SoS API v4
50 lines (49 loc) • 1.75 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 { SoSContractorEntityBaseFromJSON, SoSContractorEntityBaseToJSON, } from './SoSContractorEntityBase';
/**
* Check if a given object implements the V4ContractorsGetContractorsInViewResponseDto interface.
*/
export function instanceOfV4ContractorsGetContractorsInViewResponseDto(value) {
if (!('objects' in value) || value['objects'] === undefined)
return false;
if (!('count' in value) || value['count'] === undefined)
return false;
return true;
}
export function V4ContractorsGetContractorsInViewResponseDtoFromJSON(json) {
return V4ContractorsGetContractorsInViewResponseDtoFromJSONTyped(json, false);
}
export function V4ContractorsGetContractorsInViewResponseDtoFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
...json, // Preserve relation fields from views
'objects': (json['objects'].map(SoSContractorEntityBaseFromJSON)),
'count': json['count'],
};
}
export function V4ContractorsGetContractorsInViewResponseDtoToJSON(json) {
return V4ContractorsGetContractorsInViewResponseDtoToJSONTyped(json, false);
}
export function V4ContractorsGetContractorsInViewResponseDtoToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'objects': (value['objects'].map(SoSContractorEntityBaseToJSON)),
'count': value['count'],
};
}