UNPKG

@apideck/node

Version:
77 lines (71 loc) 1.98 kB
/* 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, mapValues } from '../runtime' import { RequestRate, RequestRateFromJSON, RequestRateToJSON } from './RequestRate' import { VirtualWebhooksResources, VirtualWebhooksResourcesFromJSON, VirtualWebhooksResourcesToJSON } from './VirtualWebhooksResources' /** * Virtual webhook config for the connector. * @export * @interface VirtualWebhooks */ export interface VirtualWebhooks { /** * * @type {RequestRate} * @memberof VirtualWebhooks */ request_rate: RequestRate /** * The resources that will be requested from downstream. * @type {{ [key: string]: VirtualWebhooksResources; }} * @memberof VirtualWebhooks */ resources?: { [key: string]: VirtualWebhooksResources } } export function VirtualWebhooksFromJSON(json: any): VirtualWebhooks { return VirtualWebhooksFromJSONTyped(json, false) } export function VirtualWebhooksFromJSONTyped( json: any, ignoreDiscriminator: boolean ): VirtualWebhooks { if (json === undefined || json === null) { return json } return { request_rate: RequestRateFromJSON(json['request_rate']), resources: !exists(json, 'resources') ? undefined : mapValues(json['resources'], VirtualWebhooksResourcesFromJSON) } } export function VirtualWebhooksToJSON(value?: VirtualWebhooks | null): any { if (value === undefined) { return undefined } if (value === null) { return null } return { request_rate: RequestRateToJSON(value.request_rate), resources: value.resources === undefined ? undefined : mapValues(value.resources, VirtualWebhooksResourcesToJSON) } }