Class: DSP::ProgressUpdateEvent

Inherits:
DSPBase
  • Object
show all
Defined in:
lib/dsp/dsp_protocol.rb

Overview

interface ProgressUpdateEvent extends Event {

    body: {
        /** The ID that was introduced in the initial 'progressStart' event. */
        progressId: string;
        /** Optional, more detailed progress message. If omitted, the previous message (if any) is used. */
        message?: string;
        /** Optional progress percentage to display (value range: 0 to 100). If omitted no percentage will be shown. */
        percentage?: number;
    };
}

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from DSPBase

#initialize, #to_h, #to_json

Constructor Details

This class inherits a constructor from DSP::DSPBase

Instance Attribute Details

#bodyObject

type: {



704
705
706
# File 'lib/dsp/dsp_protocol.rb', line 704

def body
  @body
end

#eventObject

/** The ID that was introduced in the initial ‘progressStart’ event. */

    progressId: string;
    /** Optional, more detailed progress message. If omitted, the previous message (if any) is used. */
    message?: string;
    /** Optional progress percentage to display (value range: 0 to 100). If omitted no percentage will be shown. */
    percentage?: number;
}


712
713
714
# File 'lib/dsp/dsp_protocol.rb', line 712

def event
  @event
end

#seqObject

type: {



704
705
706
# File 'lib/dsp/dsp_protocol.rb', line 704

def seq
  @seq
end

#typeObject

type: {



704
705
706
# File 'lib/dsp/dsp_protocol.rb', line 704

def type
  @type
end

Instance Method Details

#from_h!(value) ⇒ Object



714
715
716
717
718
719
720
721
# File 'lib/dsp/dsp_protocol.rb', line 714

def from_h!(value)
  value = {} if value.nil?
  self.body = value['body'] # Unknown type
  self.event = value['event']
  self.seq = value['seq']
  self.type = value['type']
  self
end