import { SchemaModel } from '@verb/src/libs/shared/base/base.model'; import { SubSchema } from '@verb/src/libs/shared/json-schema-validator/schema-types'; export class StreamAttendeeOptionsModel implements SchemaModel { public enable2fa = false; public enableCamera = false; public enableChat = false; public enableMicrophone = false; public enableMultipleHosts = false; public enablePassword = false; public enablePrivateMessages = false; public constructor(streamAttendeeOptionsSchema?: StreamAttendeeOptionsSchema) { if (streamAttendeeOptionsSchema) { this.fromSchema(streamAttendeeOptionsSchema); } } public fromSchema(streamAttendeeOptionsSchema: StreamAttendeeOptionsSchema) { this.enable2fa = streamAttendeeOptionsSchema.enable_2fa; this.enableCamera = streamAttendeeOptionsSchema.enable_camera; this.enableChat = streamAttendeeOptionsSchema.enable_chat; this.enableMicrophone = streamAttendeeOptionsSchema.enable_microphone; this.enableMultipleHosts = streamAttendeeOptionsSchema.enable_multiple_hosts; this.enablePassword = streamAttendeeOptionsSchema.enable_password; this.enablePrivateMessages = streamAttendeeOptionsSchema.enable_private_messages; } public toSchema(): StreamAttendeeOptionsSchema { return { enable_2fa: this.enable2fa, enable_camera: this.enableCamera, enable_chat: this.enableChat, enable_microphone: this.enableMicrophone, enable_multiple_hosts: this.enableMultipleHosts, enable_password: this.enablePassword, enable_private_messages: this.enablePrivateMessages, }; } } export interface StreamAttendeeOptionsSchema { enable_camera: boolean; enable_chat: boolean; enable_microphone: boolean; enable_multiple_hosts: boolean; enable_private_messages: boolean; enable_2fa: boolean; enable_password: boolean; } export const streamAttendeeOptionsValidationSchema: SubSchema = { additionalProperties: false, description: 'Stream Attendee Options', properties: { enable_2fa: { description: 'Attendee 2FA Enabled', type: 'boolean', }, enable_camera: { description: 'Attendee Camera Enabled', type: 'boolean', }, enable_chat: { description: 'Attendee Chat Enabled', type: 'boolean', }, enable_microphone: { description: 'Attendee Microphone Enabled', type: 'boolean', }, enable_multiple_hosts: { description: 'Attendee Hosting Enabled', type: 'boolean', }, enable_password: { description: 'Attendee Password Enabled', type: 'boolean', }, enable_private_messages: { description: 'Attendee Private Messages Enabled', type: 'boolean', }, }, required: [ 'enable_2fa', 'enable_camera', 'enable_chat', 'enable_microphone', 'enable_multiple_hosts', 'enable_password', 'enable_private_messages', ], type: 'object', };