/* tslint:disable */ /* eslint-disable */ /** * Boat Public API v1 * Public JSON API for creating, operating, prompting, observing, and exposing Boat sandboxes from backend services, CI jobs, hosted workers, and Boat automation products. The v1 reference intentionally documents the developer integration surface only. Dashboard billing actions are not part of v1. * * The version of the OpenAPI document: 1.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. */ import { mapValues } from '../runtime'; import type { WebhookEventType } from './WebhookEventType'; import { WebhookEventTypeFromJSON, WebhookEventTypeFromJSONTyped, WebhookEventTypeToJSON, WebhookEventTypeToJSONTyped, } from './WebhookEventType'; /** * * @export * @interface WebhookUpdateRequest */ export interface WebhookUpdateRequest { /** * * @type {string} * @memberof WebhookUpdateRequest */ name?: string | null; /** * * @type {string} * @memberof WebhookUpdateRequest */ url?: string; /** * * @type {Set} * @memberof WebhookUpdateRequest */ events?: Set; } /** * Check if a given object implements the WebhookUpdateRequest interface. */ export function instanceOfWebhookUpdateRequest(value: object): value is WebhookUpdateRequest { return true; } export function WebhookUpdateRequestFromJSON(json: any): WebhookUpdateRequest { return WebhookUpdateRequestFromJSONTyped(json, false); } export function WebhookUpdateRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): WebhookUpdateRequest { if (json == null) { return json; } return { 'name': json['name'] == null ? undefined : json['name'], 'url': json['url'] == null ? undefined : json['url'], 'events': json['events'] == null ? undefined : (new Set((json['events'] as Array).map(WebhookEventTypeFromJSON))), }; } export function WebhookUpdateRequestToJSON(json: any): WebhookUpdateRequest { return WebhookUpdateRequestToJSONTyped(json, false); } export function WebhookUpdateRequestToJSONTyped(value?: WebhookUpdateRequest | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'name': value['name'], 'url': value['url'], 'events': value['events'] == null ? undefined : (Array.from(value['events'] as Set).map(WebhookEventTypeToJSON)), }; }