mailslurp-client
Version:
Official client for MailSlurp Email and SMS API. Create email addresses and phone numbers in Javascript without a mail server. Send and receive real emails in applications or tests.
109 lines (104 loc) • 3.29 kB
text/typescript
/* tslint:disable */
/* eslint-disable */
/**
* MailSlurp API
* MailSlurp is an API for sending and receiving emails and SMS from dynamically allocated email addresses and phone numbers. It\'s designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository
*
* The version of the OpenAPI document: 6.5.2
* Contact: contact@mailslurp.dev
*
* 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 CreateTotpDeviceCustomOptions
*/
export interface CreateTotpDeviceCustomOptions {
/**
* The base32 encoded secret provided by the identity provider for the TOTP device.
* @type {string}
* @memberof CreateTotpDeviceCustomOptions
*/
secret: string;
/**
* Name for labeling the TOTP device
* @type {string}
* @memberof CreateTotpDeviceCustomOptions
*/
name?: string | null;
/**
* Optional username for the TOTP device
* @type {string}
* @memberof CreateTotpDeviceCustomOptions
*/
username?: string | null;
/**
* Optional issuer override for the TOTP device
* @type {string}
* @memberof CreateTotpDeviceCustomOptions
*/
issuer?: string | null;
/**
* Optional number of digits in TOTP code
* @type {number}
* @memberof CreateTotpDeviceCustomOptions
*/
digits?: number | null;
/**
* Optional period in seconds for TOTP code expiration
* @type {number}
* @memberof CreateTotpDeviceCustomOptions
*/
period?: number | null;
/**
* Optional algorithm override
* @type {string}
* @memberof CreateTotpDeviceCustomOptions
*/
algorithm?: string | null;
}
export function CreateTotpDeviceCustomOptionsFromJSON(
json: any
): CreateTotpDeviceCustomOptions {
return CreateTotpDeviceCustomOptionsFromJSONTyped(json, false);
}
export function CreateTotpDeviceCustomOptionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): CreateTotpDeviceCustomOptions {
if (json === undefined || json === null) {
return json;
}
return {
secret: json['secret'],
name: !exists(json, 'name') ? undefined : json['name'],
username: !exists(json, 'username') ? undefined : json['username'],
issuer: !exists(json, 'issuer') ? undefined : json['issuer'],
digits: !exists(json, 'digits') ? undefined : json['digits'],
period: !exists(json, 'period') ? undefined : json['period'],
algorithm: !exists(json, 'algorithm') ? undefined : json['algorithm'],
};
}
export function CreateTotpDeviceCustomOptionsToJSON(
value?: CreateTotpDeviceCustomOptions | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
secret: value.secret,
name: value.name,
username: value.username,
issuer: value.issuer,
digits: value.digits,
period: value.period,
algorithm: value.algorithm,
};
}