/* 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 NewWebhook
 */
export interface NewWebhook {
  /**
   *
   * @type {string}
   * @memberof NewWebhook
   */
  name: string
  /**
   *
   * @type {string}
   * @memberof NewWebhook
   */
  collection: string
  /**
   *
   * @type {string}
   * @memberof NewWebhook
   */
  destination: string
}

/**
 * Check if a given object implements the NewWebhook interface.
 */
export function instanceOfNewWebhook(value: object): value is NewWebhook {
  if (!('name' in value) || value['name'] === undefined) return false
  if (!('collection' in value) || value['collection'] === undefined) return false
  if (!('destination' in value) || value['destination'] === undefined) return false
  return true
}

export function NewWebhookFromJSON(json: any): NewWebhook {
  return NewWebhookFromJSONTyped(json, false)
}

export function NewWebhookFromJSONTyped(json: any, ignoreDiscriminator: boolean): NewWebhook {
  if (json == null) {
    return json
  }
  return {
    name: json['name'],
    collection: json['collection'],
    destination: json['destination']
  }
}

export function NewWebhookToJSON(json: any): NewWebhook {
  return NewWebhookToJSONTyped(json, false)
}

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

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