/* tslint:disable */
/* eslint-disable */
/**
 * Ticketing System API
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * 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'

/**
 *
 * @export
 * @interface WebhookUpdate
 */
export interface WebhookUpdate {
  /**
   *
   * @type {string}
   * @memberof WebhookUpdate
   */
  name?: string
  /**
   *
   * @type {string}
   * @memberof WebhookUpdate
   */
  collection?: string
  /**
   *
   * @type {string}
   * @memberof WebhookUpdate
   */
  destination?: string
}

/**
 * Check if a given object implements the WebhookUpdate interface.
 */
export function instanceOfWebhookUpdate(value: object): value is WebhookUpdate {
  return true
}

export function WebhookUpdateFromJSON(json: any): WebhookUpdate {
  return WebhookUpdateFromJSONTyped(json, false)
}

export function WebhookUpdateFromJSONTyped(json: any, ignoreDiscriminator: boolean): WebhookUpdate {
  if (json == null) {
    return json
  }
  return {
    name: json['name'] == null ? undefined : json['name'],
    collection: json['collection'] == null ? undefined : json['collection'],
    destination: json['destination'] == null ? undefined : json['destination']
  }
}

export function WebhookUpdateToJSON(json: any): WebhookUpdate {
  return WebhookUpdateToJSONTyped(json, false)
}

export function WebhookUpdateToJSONTyped(
  value?: WebhookUpdate | null,
  ignoreDiscriminator: boolean = false
): any {
  if (value == null) {
    return value
  }

  return {
    name: value['name'],
    collection: value['collection'],
    destination: value['destination']
  }
}
