@simplyhomes/sos-sdk
Version:
TypeScript SDK for Simply Homes SoS API v4
91 lines (90 loc) • 5.66 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 { SoSRentalListingEntityStatusFromJSON, SoSRentalListingEntityStatusToJSON, } from './SoSRentalListingEntityStatus';
import { SoSRentalListingEntityTenantTypeFromJSON, SoSRentalListingEntityTenantTypeToJSON, } from './SoSRentalListingEntityTenantType';
/**
* Check if a given object implements the SoSRentalListingEntityBase interface.
*/
export function instanceOfSoSRentalListingEntityBase(value) {
if (!('rlid' in value) || value['rlid'] === undefined)
return false;
if (!('unitId' in value) || value['unitId'] === undefined)
return false;
return true;
}
export function SoSRentalListingEntityBaseFromJSON(json) {
return SoSRentalListingEntityBaseFromJSONTyped(json, false);
}
export function SoSRentalListingEntityBaseFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
...json, // Preserve relation fields from views
'rlid': json['rlid'],
'unitId': json['unitId'],
'status': json['status'] == null ? undefined : SoSRentalListingEntityStatusFromJSON(json['status']),
'tenantType': json['tenantType'] == null ? undefined : SoSRentalListingEntityTenantTypeFromJSON(json['tenantType']),
'listingRentPrice': json['listingRentPrice'] == null ? undefined : json['listingRentPrice'],
'showingCount': json['showingCount'] == null ? undefined : json['showingCount'],
'applicantCount': json['applicantCount'] == null ? undefined : json['applicantCount'],
'section8InspectionCount': json['section8InspectionCount'] == null ? undefined : json['section8InspectionCount'],
'zeroListingUrl': json['zeroListingUrl'] == null ? undefined : json['zeroListingUrl'],
'affordableHousingListingUrl': json['affordableHousingListingUrl'] == null ? undefined : json['affordableHousingListingUrl'],
'notes': json['notes'] == null ? undefined : json['notes'],
'pmWalkthroughDate': json['pmWalkthroughDate'] == null ? undefined : json['pmWalkthroughDate'],
'prepareForMarketDate': json['prepareForMarketDate'] == null ? undefined : json['prepareForMarketDate'],
'listingPublishDate': json['listingPublishDate'] == null ? undefined : json['listingPublishDate'],
'firstShowingDate': json['firstShowingDate'] == null ? undefined : json['firstShowingDate'],
'firstApplicationDate': json['firstApplicationDate'] == null ? undefined : json['firstApplicationDate'],
'tenantSelectDate': json['tenantSelectDate'] == null ? undefined : json['tenantSelectDate'],
'rftaSubmissionDate': json['rftaSubmissionDate'] == null ? undefined : json['rftaSubmissionDate'],
'rftaApprovalDate': json['rftaApprovalDate'] == null ? undefined : json['rftaApprovalDate'],
'section8InspectionDate': json['section8InspectionDate'] == null ? undefined : json['section8InspectionDate'],
'section8PassedDate': json['section8PassedDate'] == null ? undefined : json['section8PassedDate'],
'createdAt': json['createdAt'] == null ? undefined : json['createdAt'],
};
}
export function SoSRentalListingEntityBaseToJSON(json) {
return SoSRentalListingEntityBaseToJSONTyped(json, false);
}
export function SoSRentalListingEntityBaseToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'rlid': value['rlid'],
'unitId': value['unitId'],
'status': SoSRentalListingEntityStatusToJSON(value['status']),
'tenantType': SoSRentalListingEntityTenantTypeToJSON(value['tenantType']),
'listingRentPrice': value['listingRentPrice'],
'showingCount': value['showingCount'],
'applicantCount': value['applicantCount'],
'section8InspectionCount': value['section8InspectionCount'],
'zeroListingUrl': value['zeroListingUrl'],
'affordableHousingListingUrl': value['affordableHousingListingUrl'],
'notes': value['notes'],
'pmWalkthroughDate': value['pmWalkthroughDate'] == null ? value['pmWalkthroughDate'] : value['pmWalkthroughDate'],
'prepareForMarketDate': value['prepareForMarketDate'] == null ? value['prepareForMarketDate'] : value['prepareForMarketDate'],
'listingPublishDate': value['listingPublishDate'] == null ? value['listingPublishDate'] : value['listingPublishDate'],
'firstShowingDate': value['firstShowingDate'] == null ? value['firstShowingDate'] : value['firstShowingDate'],
'firstApplicationDate': value['firstApplicationDate'] == null ? value['firstApplicationDate'] : value['firstApplicationDate'],
'tenantSelectDate': value['tenantSelectDate'] == null ? value['tenantSelectDate'] : value['tenantSelectDate'],
'rftaSubmissionDate': value['rftaSubmissionDate'] == null ? value['rftaSubmissionDate'] : value['rftaSubmissionDate'],
'rftaApprovalDate': value['rftaApprovalDate'] == null ? value['rftaApprovalDate'] : value['rftaApprovalDate'],
'section8InspectionDate': value['section8InspectionDate'] == null ? value['section8InspectionDate'] : value['section8InspectionDate'],
'section8PassedDate': value['section8PassedDate'] == null ? value['section8PassedDate'] : value['section8PassedDate'],
'createdAt': value['createdAt'] == null ? value['createdAt'] : value['createdAt'],
};
}