Class: VersSdk::OrchestratorVersion

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

Overview

Response struct for GET api/v1/system/version

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.from_json(json_str) ⇒ Object



187
188
189
190
# File 'lib/vers_sdk/models.rb', line 187

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



192
193
194
195
196
197
198
# File 'lib/vers_sdk/models.rb', line 192

def to_h
  {
    "executable_name" => @orchestrator_version,
    "git_hash" => @orchestrator_version,
    "workspace_version" => @orchestrator_version,
  }
end

#to_json(*args) ⇒ Object



200
201
202
# File 'lib/vers_sdk/models.rb', line 200

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