Class: DSP::SetVariableResponse

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

Overview

interface SetVariableResponse extends Response { body: { /** The new value of the variable. / value: string; /* The type of the new value. Typically shown in the UI when hovering over the value. / type?: string; /* If variablesReference is > 0, the new value is structured and its children can be retrieved by passing variablesReference to the VariablesRequest. The value should be less than or equal to 2147483647 (2^31 - 1). / variablesReference?: number; /* The number of named child variables. The client can use this optional information to present the variables in a paged UI and fetch them in chunks. The value should be less than or equal to 2147483647 (2^31 - 1). / namedVariables?: number; /* The number of indexed child variables. The client can use this optional information to present the variables in a paged UI and fetch them in chunks. The value should be less than or equal to 2147483647 (2^31 - 1). */ indexedVariables?: number; }; }

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from DSPBase

#to_h, #to_json

Constructor Details

#initialize(initial_hash = nil) ⇒ SetVariableResponse

Returns a new instance of SetVariableResponse.



2545
2546
2547
2548
# File 'lib/dsp/dsp_protocol.rb', line 2545

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

Instance Attribute Details

#bodyObject

type: {



2523
2524
2525
# File 'lib/dsp/dsp_protocol.rb', line 2523

def body
  @body
end

#commandObject

type: {



2523
2524
2525
# File 'lib/dsp/dsp_protocol.rb', line 2523

def command
  @command
end

#messageObject

type: {



2523
2524
2525
# File 'lib/dsp/dsp_protocol.rb', line 2523

def message
  @message
end

#request_seqObject

/** The new value of the variable. / value: string; /* The type of the new value. Typically shown in the UI when hovering over the value. / type?: string; /* If variablesReference is > 0, the new value is structured and its children can be retrieved by passing variablesReference to the VariablesRequest. The value should be less than or equal to 2147483647 (2^31 - 1). / variablesReference?: number; /* The number of named child variables. The client can use this optional information to present the variables in a paged UI and fetch them in chunks. The value should be less than or equal to 2147483647 (2^31 - 1). / namedVariables?: number; /* The number of indexed child variables. The client can use this optional information to present the variables in a paged UI and fetch them in chunks. The value should be less than or equal to 2147483647 (2^31 - 1). */ indexedVariables?: number; }



2543
2544
2545
# File 'lib/dsp/dsp_protocol.rb', line 2543

def request_seq
  @request_seq
end

#seqObject

type: {



2523
2524
2525
# File 'lib/dsp/dsp_protocol.rb', line 2523

def seq
  @seq
end

#successObject

type: {



2523
2524
2525
# File 'lib/dsp/dsp_protocol.rb', line 2523

def success
  @success
end

#typeObject

type: {



2523
2524
2525
# File 'lib/dsp/dsp_protocol.rb', line 2523

def type
  @type
end

Instance Method Details

#from_h!(value) ⇒ Object



2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
# File 'lib/dsp/dsp_protocol.rb', line 2550

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