GitLab steht Mittwoch, den 08. Juli, zwischen 09:00 und 13:00 Uhr aufgrund von Wartungsarbeiten nicht zur Verfügung.

MusicVolumeSessionConfigurationEntity.ts 1.78 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
import { IVolumeMusicSessionConfigurationEntity } from '../../interfaces/session_configuration/music/IVolumeMusicSessionConfigurationEntity';
import { IVolumeMusicSessionConfigurationSerialized } from '../../interfaces/session_configuration/music/IVolumeMusicSessionConfigurationSerialized';

export class MusicVolumeSessionConfigurationEntity implements IVolumeMusicSessionConfigurationEntity {
  private _global: number;

  get global(): number {
    return this._global;
  }

  set global(value: number) {
    this._global = value;
  }

  private _lobby: number;

  get lobby(): number {
    return this._lobby;
  }

  set lobby(value: number) {
    this._lobby = value;
  }

  private _countdownRunning: number;

  get countdownRunning(): number {
    return this._countdownRunning;
  }

  set countdownRunning(value: number) {
    this._countdownRunning = value;
  }

  private _countdownEnd: number;

  get countdownEnd(): number {
    return this._countdownEnd;
  }

  set countdownEnd(value: number) {
    this._countdownEnd = value;
  }

  private _useGlobalVolume: boolean;

  get useGlobalVolume(): boolean {
    return this._useGlobalVolume;
  }

  set useGlobalVolume(value: boolean) {
    this._useGlobalVolume = value;
  }

  constructor({
                global, lobby, countdownRunning, countdownEnd, useGlobalVolume,
              }) {
    this._global = global;
    this._lobby = lobby;
    this._countdownRunning = countdownRunning;
    this._countdownEnd = countdownEnd;
    this._useGlobalVolume = useGlobalVolume;
  }

  public serialize(): IVolumeMusicSessionConfigurationSerialized {
    return {
      global: this.global,
      useGlobalVolume: this.useGlobalVolume,
      lobby: this.lobby,
      countdownRunning: this.countdownRunning,
      countdownEnd: this.countdownEnd,
    };
  }
}