/* tslint:disable */
/* eslint-disable */
/**
 * FastAPI
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 0.1.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 { exists, mapValues } from "../runtime";
/**
 *
 * @export
 * @interface UserInfo
 */
export interface UserInfo {
  /**
   *
   * @type {any}
   * @memberof UserInfo
   */
  sub: any | null;
  /**
   *
   * @type {any}
   * @memberof UserInfo
   */
  email: any | null;
  /**
   *
   * @type {any}
   * @memberof UserInfo
   */
  emailVerified: any | null;
}

/**
 * Check if a given object implements the UserInfo interface.
 */
export function instanceOfUserInfo(value: object): boolean {
  let isInstance = true;
  isInstance = isInstance && "sub" in value;
  isInstance = isInstance && "email" in value;
  isInstance = isInstance && "emailVerified" in value;

  return isInstance;
}

export function UserInfoFromJSON(json: any): UserInfo {
  return UserInfoFromJSONTyped(json, false);
}

export function UserInfoFromJSONTyped(
  json: any,
  ignoreDiscriminator: boolean,
): UserInfo {
  if (json === undefined || json === null) {
    return json;
  }
  return {
    sub: json["sub"],
    email: json["email"],
    emailVerified: json["email_verified"],
  };
}

export function UserInfoToJSON(value?: UserInfo | null): any {
  if (value === undefined) {
    return undefined;
  }
  if (value === null) {
    return null;
  }
  return {
    sub: value.sub,
    email: value.email,
    email_verified: value.emailVerified,
  };
}
