Class: VersSdk::VmExecResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/vers_sdk/models.rb

Overview

Response body for POST /api/vm/vm_id/exec

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.from_json(json_str) ⇒ Object



634
635
636
637
# File 'lib/vers_sdk/models.rb', line 634

def self.from_json(json_str)
  obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
  new(obj)
end

Instance Method Details

#to_hObject



639
640
641
642
643
644
645
646
# File 'lib/vers_sdk/models.rb', line 639

def to_h
  {
    "exec_id" => @vm_exec_response,
    "exit_code" => @vm_exec_response,
    "stderr" => @vm_exec_response,
    "stdout" => @vm_exec_response,
  }
end

#to_json(*args) ⇒ Object



648
649
650
# File 'lib/vers_sdk/models.rb', line 648

def to_json(*args)
  to_h.to_json(*args)
end