import { SchemaModel } from '@verb/src/libs/shared/base/base.model'; import { HostIdentificationSchema } from '@verb/src/libs/stream/host-metadata'; // tslint:disable-next-line:ter-max-len export class HostIdentificationResponseModel implements SchemaModel { public email = ''; public givenName = ''; public familyName = ''; public constructor(hostIdentificationSchema?: HostIdentificationSchema) { if (hostIdentificationSchema) { this.fromSchema(hostIdentificationSchema); } } public fromSchema(hostIdentificationSchema: HostIdentificationSchema) { this.email = hostIdentificationSchema.email; this.givenName = hostIdentificationSchema.given_name; this.familyName = hostIdentificationSchema.family_name; } public toSchema(): HostIdentificationResponseSchema { return { email: this.email, family_name: this.familyName, given_name: this.givenName, }; } } export interface HostIdentificationResponseSchema { email: string; given_name: string; family_name: string; }