/* 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. */ import { mapValues } from '../runtime'; /** * Configuration for Gmail connector * @export * @interface GMAILConfig */ export interface GMAILConfig { /** * * @type {string} * @memberof GMAILConfig */ fromFilterType: string; /** * * @type {string} * @memberof GMAILConfig */ toFilterType: string; /** * * @type {string} * @memberof GMAILConfig */ ccFilterType: string; /** * * @type {string} * @memberof GMAILConfig */ subjectFilterType: string; /** * * @type {string} * @memberof GMAILConfig */ labelFilterType: string; /** * From Address Filter. Only include emails from these senders. Example: Add sender email(s) * @type {string} * @memberof GMAILConfig */ from?: string; /** * To Address Filter. Only include emails sent to these recipients. Example: Add recipient email(s) * @type {string} * @memberof GMAILConfig */ to?: string; /** * CC Address Filter. Only include emails with these addresses in CC field. Example: Add CC email(s) * @type {string} * @memberof GMAILConfig */ cc?: string; /** * Include Attachments. Include email attachments in the processed content * @type {boolean} * @memberof GMAILConfig */ includeAttachments?: boolean; /** * Subject Filter. Include emails with these keywords in the subject line. Example: Add subject keywords * @type {string} * @memberof GMAILConfig */ subject?: string; /** * Start Date. Only include emails sent after this date (exclusive). Format: YYYY-MM-DD.. Example: e.g., 2024-01-01 * @type {Date} * @memberof GMAILConfig */ startDate?: Date; /** * End Date. Only include emails sent before this date (exclusive). Format: YYYY-MM-DD.. Example: e.g., 2024-01-31 * @type {Date} * @memberof GMAILConfig */ endDate?: Date; /** * Maximum Results. Leave blank for no limit, or specify a maximum number. Example: Enter maximum number of threads to retrieve (leave blank for no limit) * @type {number} * @memberof GMAILConfig */ maxResults?: number; /** * Messages to Fetch. Select which categories of messages to include in the import. * @type {Array} * @memberof GMAILConfig */ messagesToFetch?: GMAILConfigMessagesToFetchEnum; /** * Label Filters. Include emails with these labels. Example: e.g., INBOX, IMPORTANT, CATEGORY_SOCIAL * @type {string} * @memberof GMAILConfig */ labelIds?: string; } /** * @export */ export const GMAILConfigMessagesToFetchEnum = { All: 'all', Inbox: 'inbox', Sent: 'sent', Archive: 'archive', SpamTrash: 'spam-trash', Unread: 'unread', Starred: 'starred', Important: 'important' } as const; export type GMAILConfigMessagesToFetchEnum = typeof GMAILConfigMessagesToFetchEnum[keyof typeof GMAILConfigMessagesToFetchEnum]; /** * Check if a given object implements the GMAILConfig interface. */ export function instanceOfGMAILConfig(value: object): value is GMAILConfig { 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; } export function GMAILConfigFromJSON(json: any): GMAILConfig { return GMAILConfigFromJSONTyped(json, false); } export function GMAILConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): GMAILConfig { 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'], }; } export function GMAILConfigToJSON(json: any): GMAILConfig { return GMAILConfigToJSONTyped(json, false); } export function GMAILConfigToJSONTyped(value?: GMAILConfig | null, ignoreDiscriminator: boolean = false): any { 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'], }; }