UNPKG

@ringer-tel/ivy

Version:
137 lines (125 loc) 4.17 kB
/* tslint:disable */ /* eslint-disable */ /** * Ringer Business API * This API provides comprehensive endpoints for the Ringer Business system. It includes functionality for managing customer accounts, addresses, sites, phone numbers, payments, users, and other business resources. Operations typically require authentication and appropriate permissions. * * The version of the OpenAPI document: 1.0.5 * Contact: support@ringer.tel * * 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 { SchemasLink } from './SchemasLink'; import { SchemasLinkFromJSON, SchemasLinkFromJSONTyped, SchemasLinkToJSON, SchemasLinkToJSONTyped, } from './SchemasLink'; /** * Detailed information about a user. * @export * @interface UserResponse */ export interface UserResponse { /** * The user's first name. * @type {string} * @memberof UserResponse */ firstName: string; /** * The user's last name. * @type {string} * @memberof UserResponse */ lastName: string; /** * The user's unique email address, used for login and notifications. * @type {string} * @memberof UserResponse */ email: string; /** * The role assigned to the user within the account (e.g., administrator, user). * @type {string} * @memberof UserResponse */ role: string; /** * Indicates whether the user's account is active and can be used to log in. * @type {boolean} * @memberof UserResponse */ active: boolean; /** * The user's preferred language and regional settings (e.g., "en-US"). * @type {string} * @memberof UserResponse */ locale: string; /** * Unique identifier for the user. * @type {number} * @memberof UserResponse */ id: number; /** * HATEOAS links related to the user. * @type {Array<SchemasLink>} * @memberof UserResponse */ links?: Array<SchemasLink>; } /** * Check if a given object implements the UserResponse interface. */ export function instanceOfUserResponse(value: object): value is UserResponse { if (!('firstName' in value) || value['firstName'] === undefined) return false; if (!('lastName' in value) || value['lastName'] === undefined) return false; if (!('email' in value) || value['email'] === undefined) return false; if (!('role' in value) || value['role'] === undefined) return false; if (!('active' in value) || value['active'] === undefined) return false; if (!('locale' in value) || value['locale'] === undefined) return false; if (!('id' in value) || value['id'] === undefined) return false; return true; } export function UserResponseFromJSON(json: any): UserResponse { return UserResponseFromJSONTyped(json, false); } export function UserResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserResponse { if (json == null) { return json; } return { 'firstName': json['first_name'], 'lastName': json['last_name'], 'email': json['email'], 'role': json['role'], 'active': json['active'], 'locale': json['locale'], 'id': json['id'], 'links': json['links'] == null ? undefined : ((json['links'] as Array<any>).map(SchemasLinkFromJSON)), }; } export function UserResponseToJSON(json: any): UserResponse { return UserResponseToJSONTyped(json, false); } export function UserResponseToJSONTyped(value?: UserResponse | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'first_name': value['firstName'], 'last_name': value['lastName'], 'email': value['email'], 'role': value['role'], 'active': value['active'], 'locale': value['locale'], 'id': value['id'], 'links': value['links'] == null ? undefined : ((value['links'] as Array<any>).map(SchemasLinkToJSON)), }; }