UNPKG

fastcomments-sdk

Version:

FastComments API Client - A SDK for interacting with the FastComments API

123 lines 4.98 kB
"use strict"; /* tslint:disable */ /* eslint-disable */ /** * fastcomments * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.instanceOfTenantBadge = instanceOfTenantBadge; exports.TenantBadgeFromJSON = TenantBadgeFromJSON; exports.TenantBadgeFromJSONTyped = TenantBadgeFromJSONTyped; exports.TenantBadgeToJSON = TenantBadgeToJSON; exports.TenantBadgeToJSONTyped = TenantBadgeToJSONTyped; /** * Check if a given object implements the TenantBadge interface. */ function instanceOfTenantBadge(value) { if (!('id' in value) || value['id'] === undefined) return false; if (!('tenantId' in value) || value['tenantId'] === undefined) return false; if (!('createdByUserId' in value) || value['createdByUserId'] === undefined) return false; if (!('createdAt' in value) || value['createdAt'] === undefined) return false; if (!('enabled' in value) || value['enabled'] === undefined) return false; if (!('type' in value) || value['type'] === undefined) return false; if (!('threshold' in value) || value['threshold'] === undefined) return false; if (!('uses' in value) || value['uses'] === undefined) return false; if (!('name' in value) || value['name'] === undefined) return false; if (!('description' in value) || value['description'] === undefined) return false; if (!('displayLabel' in value) || value['displayLabel'] === undefined) return false; if (!('displaySrc' in value) || value['displaySrc'] === undefined) return false; if (!('backgroundColor' in value) || value['backgroundColor'] === undefined) return false; if (!('borderColor' in value) || value['borderColor'] === undefined) return false; if (!('textColor' in value) || value['textColor'] === undefined) return false; if (!('isAwaitingReprocess' in value) || value['isAwaitingReprocess'] === undefined) return false; if (!('isAwaitingDeletion' in value) || value['isAwaitingDeletion'] === undefined) return false; return true; } function TenantBadgeFromJSON(json) { return TenantBadgeFromJSONTyped(json, false); } function TenantBadgeFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'id': json['_id'], 'tenantId': json['tenantId'], 'createdByUserId': json['createdByUserId'], 'createdAt': (new Date(json['createdAt'])), 'enabled': json['enabled'], 'urlId': json['urlId'] == null ? undefined : json['urlId'], 'type': json['type'], 'threshold': json['threshold'], 'uses': json['uses'], 'name': json['name'], 'description': json['description'], 'displayLabel': json['displayLabel'], 'displaySrc': json['displaySrc'], 'backgroundColor': json['backgroundColor'], 'borderColor': json['borderColor'], 'textColor': json['textColor'], 'cssClass': json['cssClass'] == null ? undefined : json['cssClass'], 'veteranUserThresholdMillis': json['veteranUserThresholdMillis'] == null ? undefined : json['veteranUserThresholdMillis'], 'isAwaitingReprocess': json['isAwaitingReprocess'], 'isAwaitingDeletion': json['isAwaitingDeletion'], 'replacesBadgeId': json['replacesBadgeId'] == null ? undefined : json['replacesBadgeId'], }; } function TenantBadgeToJSON(json) { return TenantBadgeToJSONTyped(json, false); } function TenantBadgeToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { '_id': value['id'], 'tenantId': value['tenantId'], 'createdByUserId': value['createdByUserId'], 'createdAt': ((value['createdAt']).toISOString()), 'enabled': value['enabled'], 'urlId': value['urlId'], 'type': value['type'], 'threshold': value['threshold'], 'uses': value['uses'], 'name': value['name'], 'description': value['description'], 'displayLabel': value['displayLabel'], 'displaySrc': value['displaySrc'], 'backgroundColor': value['backgroundColor'], 'borderColor': value['borderColor'], 'textColor': value['textColor'], 'cssClass': value['cssClass'], 'veteranUserThresholdMillis': value['veteranUserThresholdMillis'], 'isAwaitingReprocess': value['isAwaitingReprocess'], 'isAwaitingDeletion': value['isAwaitingDeletion'], 'replacesBadgeId': value['replacesBadgeId'], }; } //# sourceMappingURL=TenantBadge.js.map