import { CommunicationEventType , CoreTypes , Uuid } from ".." ; import { CommunicationEvent , CommunicationEventData } from "./communication-event" ; /**
 * Deadvertise event.
 */ export class DeadvertiseEvent extends CommunicationEvent < DeadvertiseEventData > { param objectIds static withObjectIds ( ... objectIds ) { return new DeadvertiseEvent ( new DeadvertiseEventData ( objectIds ) ) ; } get eventType ( ) { return CommunicationEventType . Deadvertise ; } } /**
 * Defines event data format to deadvertise an object (capability no longer
 * available or last will if connection is closed abnormally).
 */ export class DeadvertiseEventData extends CommunicationEventData { constructor ( private _objectIds ) { super ( ) ; if ( ! this . _hasValidParameters ( ) ) { throw new TypeError ( "in DeadvertiseEventData: arguments not valid" ) ; } } internal static createFrom ( eventData ) { return new DeadvertiseEventData ( eventData . objectIds ) ; } /**
     * The objectIds of the objects to be deadvertised.
     */ get objectIds ( ) { return this . _objectIds ; } toJsonObject ( ) { return { objectIds : this . _objectIds , } ; } private _hasValidParameters ( ) { return CoreTypes . isStringArray ( this . _objectIds ) && ( < string [ ] > this . _objectIds ) . every ( o => o . length > 0 ) ; } }