UNPKG

@vectorize-io/vectorize-client

Version:
102 lines (101 loc) 4.01 kB
"use strict"; /* tslint:disable */ /* eslint-disable */ /** * Vectorize API * API for Vectorize services (Beta) * * The version of the OpenAPI document: 0.1.2 * * * 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.GMAILConfigMessagesToFetchEnum = void 0; exports.instanceOfGMAILConfig = instanceOfGMAILConfig; exports.GMAILConfigFromJSON = GMAILConfigFromJSON; exports.GMAILConfigFromJSONTyped = GMAILConfigFromJSONTyped; exports.GMAILConfigToJSON = GMAILConfigToJSON; exports.GMAILConfigToJSONTyped = GMAILConfigToJSONTyped; /** * @export */ exports.GMAILConfigMessagesToFetchEnum = { All: 'all', Inbox: 'inbox', Sent: 'sent', Archive: 'archive', SpamTrash: 'spam-trash', Unread: 'unread', Starred: 'starred', Important: 'important' }; /** * Check if a given object implements the GMAILConfig interface. */ function instanceOfGMAILConfig(value) { if (!('fromFilterType' in value) || value['fromFilterType'] === undefined) return false; if (!('toFilterType' in value) || value['toFilterType'] === undefined) return false; if (!('ccFilterType' in value) || value['ccFilterType'] === undefined) return false; if (!('subjectFilterType' in value) || value['subjectFilterType'] === undefined) return false; if (!('labelFilterType' in value) || value['labelFilterType'] === undefined) return false; return true; } function GMAILConfigFromJSON(json) { return GMAILConfigFromJSONTyped(json, false); } function GMAILConfigFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'fromFilterType': json['from-filter-type'], 'toFilterType': json['to-filter-type'], 'ccFilterType': json['cc-filter-type'], 'subjectFilterType': json['subject-filter-type'], 'labelFilterType': json['label-filter-type'], 'from': json['from'] == null ? undefined : json['from'], 'to': json['to'] == null ? undefined : json['to'], 'cc': json['cc'] == null ? undefined : json['cc'], 'includeAttachments': json['include-attachments'] == null ? undefined : json['include-attachments'], 'subject': json['subject'] == null ? undefined : json['subject'], 'startDate': json['start-date'] == null ? undefined : (new Date(json['start-date'])), 'endDate': json['end-date'] == null ? undefined : (new Date(json['end-date'])), 'maxResults': json['max-results'] == null ? undefined : json['max-results'], 'messagesToFetch': json['messages-to-fetch'] == null ? undefined : json['messages-to-fetch'], 'labelIds': json['label-ids'] == null ? undefined : json['label-ids'], }; } function GMAILConfigToJSON(json) { return GMAILConfigToJSONTyped(json, false); } function GMAILConfigToJSONTyped(value, ignoreDiscriminator) { if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; } if (value == null) { return value; } return { 'from-filter-type': value['fromFilterType'], 'to-filter-type': value['toFilterType'], 'cc-filter-type': value['ccFilterType'], 'subject-filter-type': value['subjectFilterType'], 'label-filter-type': value['labelFilterType'], 'from': value['from'], 'to': value['to'], 'cc': value['cc'], 'include-attachments': value['includeAttachments'], 'subject': value['subject'], 'start-date': value['startDate'] == null ? undefined : ((value['startDate']).toISOString().substring(0, 10)), 'end-date': value['endDate'] == null ? undefined : ((value['endDate']).toISOString().substring(0, 10)), 'max-results': value['maxResults'], 'messages-to-fetch': value['messagesToFetch'], 'label-ids': value['labelIds'], }; }