/* 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 EmailTemplate
 */
export interface EmailTemplate {
  /**
   *
   * @type {string}
   * @memberof EmailTemplate
   */
  body: string
  /**
   *
   * @type {string}
   * @memberof EmailTemplate
   */
  subject: string
}

/**
 * Check if a given object implements the EmailTemplate interface.
 */
export function instanceOfEmailTemplate(value: object): value is EmailTemplate {
  if (!('body' in value) || value['body'] === undefined) return false
  if (!('subject' in value) || value['subject'] === undefined) return false
  return true
}

export function EmailTemplateFromJSON(json: any): EmailTemplate {
  return EmailTemplateFromJSONTyped(json, false)
}

export function EmailTemplateFromJSONTyped(json: any, ignoreDiscriminator: boolean): EmailTemplate {
  if (json == null) {
    return json
  }
  return {
    body: json['body'],
    subject: json['subject']
  }
}

export function EmailTemplateToJSON(json: any): EmailTemplate {
  return EmailTemplateToJSONTyped(json, false)
}

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

  return {
    body: value['body'],
    subject: value['subject']
  }
}
