/* 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 UserUpdate
 */
export interface UserUpdate {
  /**
   *
   * @type {string}
   * @memberof UserUpdate
   */
  username?: string
  /**
   *
   * @type {string}
   * @memberof UserUpdate
   */
  avatar?: string
  /**
   *
   * @type {string}
   * @memberof UserUpdate
   */
  email?: string
  /**
   *
   * @type {string}
   * @memberof UserUpdate
   */
  name?: string
  /**
   *
   * @type {string}
   * @memberof UserUpdate
   */
  password?: string
  /**
   *
   * @type {string}
   * @memberof UserUpdate
   */
  passwordConfirm?: string
  /**
   *
   * @type {boolean}
   * @memberof UserUpdate
   */
  active?: boolean
}

/**
 * Check if a given object implements the UserUpdate interface.
 */
export function instanceOfUserUpdate(value: object): value is UserUpdate {
  return true
}

export function UserUpdateFromJSON(json: any): UserUpdate {
  return UserUpdateFromJSONTyped(json, false)
}

export function UserUpdateFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserUpdate {
  if (json == null) {
    return json
  }
  return {
    username: json['username'] == null ? undefined : json['username'],
    avatar: json['avatar'] == null ? undefined : json['avatar'],
    email: json['email'] == null ? undefined : json['email'],
    name: json['name'] == null ? undefined : json['name'],
    password: json['password'] == null ? undefined : json['password'],
    passwordConfirm: json['passwordConfirm'] == null ? undefined : json['passwordConfirm'],
    active: json['active'] == null ? undefined : json['active']
  }
}

export function UserUpdateToJSON(json: any): UserUpdate {
  return UserUpdateToJSONTyped(json, false)
}

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

  return {
    username: value['username'],
    avatar: value['avatar'],
    email: value['email'],
    name: value['name'],
    password: value['password'],
    passwordConfirm: value['passwordConfirm'],
    active: value['active']
  }
}
