Class: DSP::ModulesResponse

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

Overview

interface ModulesResponse extends Response {

    body: {
        /** All modules or range of modules. */
        modules: Module[];
        /** The total number of modules available. */
        totalModules?: number;
    };
}

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from DSPBase

#to_h, #to_json

Constructor Details

#initialize(initial_hash = nil) ⇒ ModulesResponse

Returns a new instance of ModulesResponse.



2802
2803
2804
2805
# File 'lib/dsp/dsp_protocol.rb', line 2802

def initialize(initial_hash = nil)
  super
  @optional_method_names = %i[message]
end

Instance Attribute Details

#bodyObject

type: {



2794
2795
2796
# File 'lib/dsp/dsp_protocol.rb', line 2794

def body
  @body
end

#commandObject

type: {



2794
2795
2796
# File 'lib/dsp/dsp_protocol.rb', line 2794

def command
  @command
end

#messageObject

type: {



2794
2795
2796
# File 'lib/dsp/dsp_protocol.rb', line 2794

def message
  @message
end

#request_seqObject

/** All modules or range of modules. */

    modules: Module[];
    /** The total number of modules available. */
    totalModules?: number;
}


2800
2801
2802
# File 'lib/dsp/dsp_protocol.rb', line 2800

def request_seq
  @request_seq
end

#seqObject

type: {



2794
2795
2796
# File 'lib/dsp/dsp_protocol.rb', line 2794

def seq
  @seq
end

#successObject

type: {



2794
2795
2796
# File 'lib/dsp/dsp_protocol.rb', line 2794

def success
  @success
end

#typeObject

type: {



2794
2795
2796
# File 'lib/dsp/dsp_protocol.rb', line 2794

def type
  @type
end

Instance Method Details

#from_h!(value) ⇒ Object



2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
# File 'lib/dsp/dsp_protocol.rb', line 2807

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