@simplyhomes/sos-sdk
Version:
TypeScript SDK for Simply Homes SoS API v4
52 lines (51 loc) • 1.92 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 { SoSContractorEntityStatusFromJSON, SoSContractorEntityStatusToJSON, } from './SoSContractorEntityStatus';
/**
* Check if a given object implements the V4ContractorsUpdateContractorBodyDto interface.
*/
export function instanceOfV4ContractorsUpdateContractorBodyDto(value) {
return true;
}
export function V4ContractorsUpdateContractorBodyDtoFromJSON(json) {
return V4ContractorsUpdateContractorBodyDtoFromJSONTyped(json, false);
}
export function V4ContractorsUpdateContractorBodyDtoFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
...json, // Preserve relation fields from views
'name': json['name'] == null ? undefined : json['name'],
'phone': json['phone'] == null ? undefined : json['phone'],
'email': json['email'] == null ? undefined : json['email'],
'organizationId': json['organizationId'] == null ? undefined : json['organizationId'],
'status': json['status'] == null ? undefined : SoSContractorEntityStatusFromJSON(json['status']),
};
}
export function V4ContractorsUpdateContractorBodyDtoToJSON(json) {
return V4ContractorsUpdateContractorBodyDtoToJSONTyped(json, false);
}
export function V4ContractorsUpdateContractorBodyDtoToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'name': value['name'],
'phone': value['phone'],
'email': value['email'],
'organizationId': value['organizationId'],
'status': SoSContractorEntityStatusToJSON(value['status']),
};
}