/* 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'
import type { EmailTemplate } from './EmailTemplate'
import {
  EmailTemplateFromJSON,
  EmailTemplateFromJSONTyped,
  EmailTemplateToJSON,
  EmailTemplateToJSONTyped
} from './EmailTemplate'

/**
 *
 * @export
 * @interface SettingsMeta
 */
export interface SettingsMeta {
  /**
   *
   * @type {string}
   * @memberof SettingsMeta
   */
  appName: string
  /**
   *
   * @type {string}
   * @memberof SettingsMeta
   */
  appUrl: string
  /**
   *
   * @type {string}
   * @memberof SettingsMeta
   */
  senderName: string
  /**
   *
   * @type {string}
   * @memberof SettingsMeta
   */
  senderAddress: string
  /**
   *
   * @type {EmailTemplate}
   * @memberof SettingsMeta
   */
  resetPasswordTemplate: EmailTemplate
}

/**
 * Check if a given object implements the SettingsMeta interface.
 */
export function instanceOfSettingsMeta(value: object): value is SettingsMeta {
  if (!('appName' in value) || value['appName'] === undefined) return false
  if (!('appUrl' in value) || value['appUrl'] === undefined) return false
  if (!('senderName' in value) || value['senderName'] === undefined) return false
  if (!('senderAddress' in value) || value['senderAddress'] === undefined) return false
  if (!('resetPasswordTemplate' in value) || value['resetPasswordTemplate'] === undefined)
    return false
  return true
}

export function SettingsMetaFromJSON(json: any): SettingsMeta {
  return SettingsMetaFromJSONTyped(json, false)
}

export function SettingsMetaFromJSONTyped(json: any, ignoreDiscriminator: boolean): SettingsMeta {
  if (json == null) {
    return json
  }
  return {
    appName: json['app_name'],
    appUrl: json['app_url'],
    senderName: json['sender_name'],
    senderAddress: json['sender_address'],
    resetPasswordTemplate: EmailTemplateFromJSON(json['reset_password_template'])
  }
}

export function SettingsMetaToJSON(json: any): SettingsMeta {
  return SettingsMetaToJSONTyped(json, false)
}

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

  return {
    app_name: value['appName'],
    app_url: value['appUrl'],
    sender_name: value['senderName'],
    sender_address: value['senderAddress'],
    reset_password_template: EmailTemplateToJSON(value['resetPasswordTemplate'])
  }
}
