/* 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 { SettingsMeta } from './SettingsMeta'
import {
  SettingsMetaFromJSON,
  SettingsMetaFromJSONTyped,
  SettingsMetaToJSON,
  SettingsMetaToJSONTyped
} from './SettingsMeta'
import type { SettingsSmtp } from './SettingsSmtp'
import {
  SettingsSmtpFromJSON,
  SettingsSmtpFromJSONTyped,
  SettingsSmtpToJSON,
  SettingsSmtpToJSONTyped
} from './SettingsSmtp'

/**
 *
 * @export
 * @interface Settings
 */
export interface Settings {
  /**
   *
   * @type {SettingsMeta}
   * @memberof Settings
   */
  meta: SettingsMeta
  /**
   *
   * @type {SettingsSmtp}
   * @memberof Settings
   */
  smtp: SettingsSmtp
}

/**
 * Check if a given object implements the Settings interface.
 */
export function instanceOfSettings(value: object): value is Settings {
  if (!('meta' in value) || value['meta'] === undefined) return false
  if (!('smtp' in value) || value['smtp'] === undefined) return false
  return true
}

export function SettingsFromJSON(json: any): Settings {
  return SettingsFromJSONTyped(json, false)
}

export function SettingsFromJSONTyped(json: any, ignoreDiscriminator: boolean): Settings {
  if (json == null) {
    return json
  }
  return {
    meta: SettingsMetaFromJSON(json['meta']),
    smtp: SettingsSmtpFromJSON(json['smtp'])
  }
}

export function SettingsToJSON(json: any): Settings {
  return SettingsToJSONTyped(json, false)
}

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

  return {
    meta: SettingsMetaToJSON(value['meta']),
    smtp: SettingsSmtpToJSON(value['smtp'])
  }
}
