Class: DSP::CompletionsResponse

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

Overview

interface CompletionsResponse extends Response {

    body: {
        /** The possible completions for . */
        targets: CompletionItem[];
    };
}

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from DSPBase

#to_h, #to_json

Constructor Details

#initialize(initial_hash = nil) ⇒ CompletionsResponse

Returns a new instance of CompletionsResponse.



3322
3323
3324
3325
# File 'lib/dsp/dsp_protocol.rb', line 3322

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

Instance Attribute Details

#bodyObject

type: {



3316
3317
3318
# File 'lib/dsp/dsp_protocol.rb', line 3316

def body
  @body
end

#commandObject

type: {



3316
3317
3318
# File 'lib/dsp/dsp_protocol.rb', line 3316

def command
  @command
end

#messageObject

type: {



3316
3317
3318
# File 'lib/dsp/dsp_protocol.rb', line 3316

def message
  @message
end

#request_seqObject

/** The possible completions for . */

    targets: CompletionItem[];
}


3320
3321
3322
# File 'lib/dsp/dsp_protocol.rb', line 3320

def request_seq
  @request_seq
end

#seqObject

type: {



3316
3317
3318
# File 'lib/dsp/dsp_protocol.rb', line 3316

def seq
  @seq
end

#successObject

type: {



3316
3317
3318
# File 'lib/dsp/dsp_protocol.rb', line 3316

def success
  @success
end

#typeObject

type: {



3316
3317
3318
# File 'lib/dsp/dsp_protocol.rb', line 3316

def type
  @type
end

Instance Method Details

#from_h!(value) ⇒ Object



3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
# File 'lib/dsp/dsp_protocol.rb', line 3327

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