/* 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 SettingsSmtp
 */
export interface SettingsSmtp {
  /**
   *
   * @type {boolean}
   * @memberof SettingsSmtp
   */
  enabled: boolean
  /**
   *
   * @type {string}
   * @memberof SettingsSmtp
   */
  host: string
  /**
   *
   * @type {number}
   * @memberof SettingsSmtp
   */
  port: number
  /**
   *
   * @type {string}
   * @memberof SettingsSmtp
   */
  username: string
  /**
   *
   * @type {string}
   * @memberof SettingsSmtp
   */
  password: string
  /**
   *
   * @type {string}
   * @memberof SettingsSmtp
   */
  authMethod: string
  /**
   *
   * @type {boolean}
   * @memberof SettingsSmtp
   */
  tls: boolean
  /**
   *
   * @type {string}
   * @memberof SettingsSmtp
   */
  localName: string
}

/**
 * Check if a given object implements the SettingsSmtp interface.
 */
export function instanceOfSettingsSmtp(value: object): value is SettingsSmtp {
  if (!('enabled' in value) || value['enabled'] === undefined) return false
  if (!('host' in value) || value['host'] === undefined) return false
  if (!('port' in value) || value['port'] === undefined) return false
  if (!('username' in value) || value['username'] === undefined) return false
  if (!('password' in value) || value['password'] === undefined) return false
  if (!('authMethod' in value) || value['authMethod'] === undefined) return false
  if (!('tls' in value) || value['tls'] === undefined) return false
  if (!('localName' in value) || value['localName'] === undefined) return false
  return true
}

export function SettingsSmtpFromJSON(json: any): SettingsSmtp {
  return SettingsSmtpFromJSONTyped(json, false)
}

export function SettingsSmtpFromJSONTyped(json: any, ignoreDiscriminator: boolean): SettingsSmtp {
  if (json == null) {
    return json
  }
  return {
    enabled: json['enabled'],
    host: json['host'],
    port: json['port'],
    username: json['username'],
    password: json['password'],
    authMethod: json['auth_method'],
    tls: json['tls'],
    localName: json['local_name']
  }
}

export function SettingsSmtpToJSON(json: any): SettingsSmtp {
  return SettingsSmtpToJSONTyped(json, false)
}

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

  return {
    enabled: value['enabled'],
    host: value['host'],
    port: value['port'],
    username: value['username'],
    password: value['password'],
    auth_method: value['authMethod'],
    tls: value['tls'],
    local_name: value['localName']
  }
}
