UNPKG

@simplyhomes/sos-sdk

Version:

TypeScript SDK for Simply Homes SoS API v4

66 lines (65 loc) 2.99 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 { SoSRenovationEntityStatusFromJSON, SoSRenovationEntityStatusToJSON, } from './SoSRenovationEntityStatus'; /** * Check if a given object implements the V4RenovationsUpdateRenovationBody interface. */ export function instanceOfV4RenovationsUpdateRenovationBody(value) { return true; } export function V4RenovationsUpdateRenovationBodyFromJSON(json) { return V4RenovationsUpdateRenovationBodyFromJSONTyped(json, false); } export function V4RenovationsUpdateRenovationBodyFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { ...json, // Preserve relation fields from views 'unitId': json['unitId'] == null ? undefined : json['unitId'], 'inspectionId': json['inspectionId'] == null ? undefined : json['inspectionId'], 'status': json['status'] == null ? undefined : SoSRenovationEntityStatusFromJSON(json['status']), 'name': json['name'] == null ? undefined : json['name'], 'notes': json['notes'] == null ? undefined : json['notes'], 'budget': json['budget'] == null ? undefined : json['budget'], 'actualCost': json['actualCost'] == null ? undefined : json['actualCost'], 'budgetAllocated': json['budgetAllocated'] == null ? undefined : json['budgetAllocated'], 'deadline': json['deadline'] == null ? undefined : json['deadline'], 'startDate': json['startDate'] == null ? undefined : json['startDate'], 'completionDate': json['completionDate'] == null ? undefined : json['completionDate'], 'createdAt': json['createdAt'] == null ? undefined : json['createdAt'], }; } export function V4RenovationsUpdateRenovationBodyToJSON(json) { return V4RenovationsUpdateRenovationBodyToJSONTyped(json, false); } export function V4RenovationsUpdateRenovationBodyToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'unitId': value['unitId'], 'inspectionId': value['inspectionId'], 'status': SoSRenovationEntityStatusToJSON(value['status']), 'name': value['name'], 'notes': value['notes'], 'budget': value['budget'], 'actualCost': value['actualCost'], 'budgetAllocated': value['budgetAllocated'], 'deadline': value['deadline'] == null ? value['deadline'] : value['deadline'], 'startDate': value['startDate'] == null ? value['startDate'] : value['startDate'], 'completionDate': value['completionDate'] == null ? value['completionDate'] : value['completionDate'], 'createdAt': value['createdAt'] == null ? value['createdAt'] : value['createdAt'], }; }