import { SchemaModel } from '@verb/src/libs/shared/base/base.model'; import { SubSchema } from '@verb/src/libs/shared/json-schema-validator/schema-types'; export class StreamAuthenticationModel implements SchemaModel { public streamPassword: string | null = null; public constructor(streamAuthenticationSchema?: StreamAuthenticationSchema) { if (streamAuthenticationSchema) { this.fromSchema(streamAuthenticationSchema); } } public fromSchema(streamAuthenticationSchema: StreamAuthenticationSchema) { this.streamPassword = streamAuthenticationSchema.stream_password; } public toSchema(): StreamAuthenticationSchema { return { stream_password: this.streamPassword, }; } } export interface StreamAuthenticationSchema { stream_password: string | null; } export const streamAuthenticationValidationSchema: SubSchema = { additionalProperties: false, description: 'Stream authentication property', properties: { stream_password: { description: 'Stream password', type: ['string', 'null'], }, }, required: ['stream_password'], type: 'object', };