@apideck/node
Version:
Apideck Node.js SDK
105 lines (100 loc) • 2.63 kB
text/typescript
/* tslint:disable */
/* eslint-disable */
/**
* Apideck
* The Apideck OpenAPI Spec: SDK Optimized
*
* The version of the OpenAPI document: 10.13.0
* Contact: support@apideck.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { exists } from '../runtime'
/**
*
* @export
* @interface ContactsFilter
*/
export interface ContactsFilter {
/**
* Name of the contact to filter on
* @type {string}
* @memberof ContactsFilter
*/
name?: string
/**
* First name of the contact to filter on
* @type {string}
* @memberof ContactsFilter
*/
first_name?: string
/**
* Last name of the contact to filter on
* @type {string}
* @memberof ContactsFilter
*/
last_name?: string
/**
* Email of the contact to filter on
* @type {string}
* @memberof ContactsFilter
*/
email?: string
/**
* Phone number of the contact to filter on
* @type {string}
* @memberof ContactsFilter
*/
phone_number?: string
/**
* Unique identifier for the associated company of the contact to filter on
* @type {string}
* @memberof ContactsFilter
*/
company_id?: string
/**
* Unique identifier for the owner of the contact to filter on
* @type {string}
* @memberof ContactsFilter
*/
owner_id?: string
}
export function ContactsFilterFromJSON(json: any): ContactsFilter {
return ContactsFilterFromJSONTyped(json, false)
}
export function ContactsFilterFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): ContactsFilter {
if (json === undefined || json === null) {
return json
}
return {
name: !exists(json, 'name') ? undefined : json['name'],
first_name: !exists(json, 'first_name') ? undefined : json['first_name'],
last_name: !exists(json, 'last_name') ? undefined : json['last_name'],
email: !exists(json, 'email') ? undefined : json['email'],
phone_number: !exists(json, 'phone_number') ? undefined : json['phone_number'],
company_id: !exists(json, 'company_id') ? undefined : json['company_id'],
owner_id: !exists(json, 'owner_id') ? undefined : json['owner_id']
}
}
export function ContactsFilterToJSON(value?: ContactsFilter | null): any {
if (value === undefined) {
return undefined
}
if (value === null) {
return null
}
return {
name: value.name,
first_name: value.first_name,
last_name: value.last_name,
email: value.email,
phone_number: value.phone_number,
company_id: value.company_id,
owner_id: value.owner_id
}
}