volcano-sdk 0.32.7 → 0.33.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -2
  3. data/lib/volcano/client.rb +3 -2
  4. data/lib/volcano/generated/lib/volcano-generated/api/sandboxes_api.rb +1433 -0
  5. data/lib/volcano/generated/lib/volcano-generated/models/create_sandbox_session_request.rb +294 -0
  6. data/lib/volcano/generated/lib/volcano-generated/models/create_sandbox_template_request.rb +247 -0
  7. data/lib/volcano/generated/lib/volcano-generated/models/publish_sandbox_preset_request.rb +268 -0
  8. data/lib/volcano/generated/lib/volcano-generated/models/sandbox_access.rb +216 -0
  9. data/lib/volcano/generated/lib/volcano-generated/models/sandbox_access_request.rb +221 -0
  10. data/lib/volcano/generated/lib/volcano-generated/models/sandbox_capacity.rb +199 -0
  11. data/lib/volcano/generated/lib/volcano-generated/models/sandbox_capacity_list.rb +166 -0
  12. data/lib/volcano/generated/lib/volcano-generated/models/sandbox_command_request.rb +251 -0
  13. data/lib/volcano/generated/lib/volcano-generated/models/sandbox_command_result.rb +294 -0
  14. data/lib/volcano/generated/lib/volcano-generated/models/sandbox_deployment.rb +242 -0
  15. data/lib/volcano/generated/lib/volcano-generated/models/sandbox_deployment_page.rb +192 -0
  16. data/lib/volcano/generated/lib/volcano-generated/models/sandbox_execution_request.rb +329 -0
  17. data/lib/volcano/generated/lib/volcano-generated/models/sandbox_execution_result.rb +381 -0
  18. data/lib/volcano/generated/lib/volcano-generated/models/sandbox_file_read_request.rb +182 -0
  19. data/lib/volcano/generated/lib/volcano-generated/models/sandbox_file_result.rb +164 -0
  20. data/lib/volcano/generated/lib/volcano-generated/models/sandbox_file_write_request.rb +217 -0
  21. data/lib/volcano/generated/lib/volcano-generated/models/sandbox_pagination.rb +199 -0
  22. data/lib/volcano/generated/lib/volcano-generated/models/sandbox_preset.rb +294 -0
  23. data/lib/volcano/generated/lib/volcano-generated/models/sandbox_preset_list.rb +166 -0
  24. data/lib/volcano/generated/lib/volcano-generated/models/sandbox_session.rb +407 -0
  25. data/lib/volcano/generated/lib/volcano-generated/models/sandbox_session_page.rb +192 -0
  26. data/lib/volcano/generated/lib/volcano-generated/models/sandbox_subject_grant_request.rb +164 -0
  27. data/lib/volcano/generated/lib/volcano-generated/models/sandbox_template.rb +321 -0
  28. data/lib/volcano/generated/lib/volcano-generated/models/sandbox_template_page.rb +192 -0
  29. data/lib/volcano/generated/lib/volcano-generated/models/update_sandbox_template_request.rb +175 -0
  30. data/lib/volcano/generated/lib/volcano-generated.rb +26 -0
  31. data/lib/volcano/generated_transport.rb +1 -0
  32. data/lib/volcano/generated_transport_sandbox.rb +69 -0
  33. data/lib/volcano/sandbox_files.rb +37 -0
  34. data/lib/volcano/sandbox_models.rb +24 -0
  35. data/lib/volcano/sandbox_request.rb +92 -0
  36. data/lib/volcano/sandbox_response.rb +74 -0
  37. data/lib/volcano/sandbox_session.rb +78 -0
  38. data/lib/volcano/sandboxes.rb +67 -0
  39. data/lib/volcano/version.rb +1 -1
  40. data/lib/volcano.rb +7 -0
  41. data/sig/client.rbs +1 -0
  42. data/sig/sandboxes.rbs +83 -0
  43. metadata +50 -2
@@ -0,0 +1,199 @@
1
+ =begin
2
+ #Volcano Hosting API
3
+
4
+ #Public API for Volcano Hosting clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations.
5
+
6
+ The version of the OpenAPI document: 3.0.0
7
+ Contact: support@volcano.dev
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.17.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Volcano::Generated
17
+ class SandboxCapacity < ApiModelBase
18
+ attr_accessor :region
19
+
20
+ attr_accessor :allocated_memory_mb
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'region' => :'region',
26
+ :'allocated_memory_mb' => :'allocated_memory_mb'
27
+ }
28
+ end
29
+
30
+ # Returns attribute mapping this model knows about
31
+ def self.acceptable_attribute_map
32
+ attribute_map
33
+ end
34
+
35
+ # Returns all the JSON keys this model knows about
36
+ def self.acceptable_attributes
37
+ acceptable_attribute_map.values
38
+ end
39
+
40
+ # Attribute type mapping.
41
+ def self.openapi_types
42
+ {
43
+ :'region' => :'String',
44
+ :'allocated_memory_mb' => :'Integer'
45
+ }
46
+ end
47
+
48
+ # List of attributes with nullable: true
49
+ def self.openapi_nullable
50
+ Set.new([
51
+ ])
52
+ end
53
+
54
+ # Initializes the object
55
+ # @param [Hash] attributes Model attributes in the form of hash
56
+ def initialize(attributes = {})
57
+ if (!attributes.is_a?(Hash))
58
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::SandboxCapacity` initialize method"
59
+ end
60
+
61
+ # check to see if the attribute exists and convert string to symbol for hash key
62
+ acceptable_attribute_map = self.class.acceptable_attribute_map
63
+ attributes = attributes.each_with_object({}) { |(k, v), h|
64
+ if (!acceptable_attribute_map.key?(k.to_sym))
65
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::SandboxCapacity`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
66
+ end
67
+ h[k.to_sym] = v
68
+ }
69
+
70
+ if attributes.key?(:'region')
71
+ self.region = attributes[:'region']
72
+ else
73
+ self.region = nil
74
+ end
75
+
76
+ if attributes.key?(:'allocated_memory_mb')
77
+ self.allocated_memory_mb = attributes[:'allocated_memory_mb']
78
+ else
79
+ self.allocated_memory_mb = nil
80
+ end
81
+ end
82
+
83
+ # Show invalid properties with the reasons. Usually used together with valid?
84
+ # @return Array for valid properties with the reasons
85
+ def list_invalid_properties
86
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
87
+ invalid_properties = Array.new
88
+ if @region.nil?
89
+ invalid_properties.push('invalid value for "region", region cannot be nil.')
90
+ end
91
+
92
+ if @allocated_memory_mb.nil?
93
+ invalid_properties.push('invalid value for "allocated_memory_mb", allocated_memory_mb cannot be nil.')
94
+ end
95
+
96
+ if @allocated_memory_mb < 0
97
+ invalid_properties.push('invalid value for "allocated_memory_mb", must be greater than or equal to 0.')
98
+ end
99
+
100
+ invalid_properties
101
+ end
102
+
103
+ # Check to see if the all the properties in the model are valid
104
+ # @return true if the model is valid
105
+ def valid?
106
+ warn '[DEPRECATED] the `valid?` method is obsolete'
107
+ return false if @region.nil?
108
+ return false if @allocated_memory_mb.nil?
109
+ return false if @allocated_memory_mb < 0
110
+ true
111
+ end
112
+
113
+ # Custom attribute writer method with validation
114
+ # @param [Object] region Value to be assigned
115
+ def region=(region)
116
+ if region.nil?
117
+ fail ArgumentError, 'region cannot be nil'
118
+ end
119
+
120
+ @region = region
121
+ end
122
+
123
+ # Custom attribute writer method with validation
124
+ # @param [Object] allocated_memory_mb Value to be assigned
125
+ def allocated_memory_mb=(allocated_memory_mb)
126
+ if allocated_memory_mb.nil?
127
+ fail ArgumentError, 'allocated_memory_mb cannot be nil'
128
+ end
129
+
130
+ if allocated_memory_mb < 0
131
+ fail ArgumentError, 'invalid value for "allocated_memory_mb", must be greater than or equal to 0.'
132
+ end
133
+
134
+ @allocated_memory_mb = allocated_memory_mb
135
+ end
136
+
137
+ # Checks equality by comparing each attribute.
138
+ # @param [Object] Object to be compared
139
+ def ==(o)
140
+ return true if self.equal?(o)
141
+ self.class == o.class &&
142
+ region == o.region &&
143
+ allocated_memory_mb == o.allocated_memory_mb
144
+ end
145
+
146
+ # @see the `==` method
147
+ # @param [Object] Object to be compared
148
+ def eql?(o)
149
+ self == o
150
+ end
151
+
152
+ # Calculates hash code according to all attributes.
153
+ # @return [Integer] Hash code
154
+ def hash
155
+ [region, allocated_memory_mb].hash
156
+ end
157
+
158
+ # Builds the object from hash
159
+ # @param [Hash] attributes Model attributes in the form of hash
160
+ # @return [Object] Returns the model itself
161
+ def self.build_from_hash(attributes)
162
+ return nil unless attributes.is_a?(Hash)
163
+ attributes = attributes.transform_keys(&:to_sym)
164
+ transformed_hash = {}
165
+ openapi_types.each_pair do |key, type|
166
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
167
+ transformed_hash["#{key}"] = nil
168
+ elsif type =~ /\AArray<(.*)>/i
169
+ # check to ensure the input is an array given that the attribute
170
+ # is documented as an array but the input is not
171
+ if attributes[attribute_map[key]].is_a?(Array)
172
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
173
+ end
174
+ elsif !attributes[attribute_map[key]].nil?
175
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
176
+ end
177
+ end
178
+ new(transformed_hash)
179
+ end
180
+
181
+ # Returns the object in the form of hash
182
+ # @return [Hash] Returns the object in the form of hash
183
+ def to_hash
184
+ hash = {}
185
+ self.class.attribute_map.each_pair do |attr, param|
186
+ value = self.send(attr)
187
+ if value.nil?
188
+ is_nullable = self.class.openapi_nullable.include?(attr)
189
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
190
+ end
191
+
192
+ hash[param] = _to_hash(value)
193
+ end
194
+ hash
195
+ end
196
+
197
+ end
198
+
199
+ end
@@ -0,0 +1,166 @@
1
+ =begin
2
+ #Volcano Hosting API
3
+
4
+ #Public API for Volcano Hosting clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations.
5
+
6
+ The version of the OpenAPI document: 3.0.0
7
+ Contact: support@volcano.dev
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.17.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Volcano::Generated
17
+ class SandboxCapacityList < ApiModelBase
18
+ attr_accessor :data
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'data' => :'data'
24
+ }
25
+ end
26
+
27
+ # Returns attribute mapping this model knows about
28
+ def self.acceptable_attribute_map
29
+ attribute_map
30
+ end
31
+
32
+ # Returns all the JSON keys this model knows about
33
+ def self.acceptable_attributes
34
+ acceptable_attribute_map.values
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.openapi_types
39
+ {
40
+ :'data' => :'Array<SandboxCapacity>'
41
+ }
42
+ end
43
+
44
+ # List of attributes with nullable: true
45
+ def self.openapi_nullable
46
+ Set.new([
47
+ ])
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param [Hash] attributes Model attributes in the form of hash
52
+ def initialize(attributes = {})
53
+ if (!attributes.is_a?(Hash))
54
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::SandboxCapacityList` initialize method"
55
+ end
56
+
57
+ # check to see if the attribute exists and convert string to symbol for hash key
58
+ acceptable_attribute_map = self.class.acceptable_attribute_map
59
+ attributes = attributes.each_with_object({}) { |(k, v), h|
60
+ if (!acceptable_attribute_map.key?(k.to_sym))
61
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::SandboxCapacityList`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
62
+ end
63
+ h[k.to_sym] = v
64
+ }
65
+
66
+ if attributes.key?(:'data')
67
+ if (value = attributes[:'data']).is_a?(Array)
68
+ self.data = value
69
+ end
70
+ else
71
+ self.data = nil
72
+ end
73
+ end
74
+
75
+ # Show invalid properties with the reasons. Usually used together with valid?
76
+ # @return Array for valid properties with the reasons
77
+ def list_invalid_properties
78
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
79
+ invalid_properties = Array.new
80
+ if @data.nil?
81
+ invalid_properties.push('invalid value for "data", data cannot be nil.')
82
+ end
83
+
84
+ invalid_properties
85
+ end
86
+
87
+ # Check to see if the all the properties in the model are valid
88
+ # @return true if the model is valid
89
+ def valid?
90
+ warn '[DEPRECATED] the `valid?` method is obsolete'
91
+ return false if @data.nil?
92
+ true
93
+ end
94
+
95
+ # Custom attribute writer method with validation
96
+ # @param [Object] data Value to be assigned
97
+ def data=(data)
98
+ if data.nil?
99
+ fail ArgumentError, 'data cannot be nil'
100
+ end
101
+
102
+ @data = data
103
+ end
104
+
105
+ # Checks equality by comparing each attribute.
106
+ # @param [Object] Object to be compared
107
+ def ==(o)
108
+ return true if self.equal?(o)
109
+ self.class == o.class &&
110
+ data == o.data
111
+ end
112
+
113
+ # @see the `==` method
114
+ # @param [Object] Object to be compared
115
+ def eql?(o)
116
+ self == o
117
+ end
118
+
119
+ # Calculates hash code according to all attributes.
120
+ # @return [Integer] Hash code
121
+ def hash
122
+ [data].hash
123
+ end
124
+
125
+ # Builds the object from hash
126
+ # @param [Hash] attributes Model attributes in the form of hash
127
+ # @return [Object] Returns the model itself
128
+ def self.build_from_hash(attributes)
129
+ return nil unless attributes.is_a?(Hash)
130
+ attributes = attributes.transform_keys(&:to_sym)
131
+ transformed_hash = {}
132
+ openapi_types.each_pair do |key, type|
133
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
134
+ transformed_hash["#{key}"] = nil
135
+ elsif type =~ /\AArray<(.*)>/i
136
+ # check to ensure the input is an array given that the attribute
137
+ # is documented as an array but the input is not
138
+ if attributes[attribute_map[key]].is_a?(Array)
139
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
140
+ end
141
+ elsif !attributes[attribute_map[key]].nil?
142
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
143
+ end
144
+ end
145
+ new(transformed_hash)
146
+ end
147
+
148
+ # Returns the object in the form of hash
149
+ # @return [Hash] Returns the object in the form of hash
150
+ def to_hash
151
+ hash = {}
152
+ self.class.attribute_map.each_pair do |attr, param|
153
+ value = self.send(attr)
154
+ if value.nil?
155
+ is_nullable = self.class.openapi_nullable.include?(attr)
156
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
157
+ end
158
+
159
+ hash[param] = _to_hash(value)
160
+ end
161
+ hash
162
+ end
163
+
164
+ end
165
+
166
+ end
@@ -0,0 +1,251 @@
1
+ =begin
2
+ #Volcano Hosting API
3
+
4
+ #Public API for Volcano Hosting clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations.
5
+
6
+ The version of the OpenAPI document: 3.0.0
7
+ Contact: support@volcano.dev
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.17.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Volcano::Generated
17
+ class SandboxCommandRequest < ApiModelBase
18
+ attr_accessor :command
19
+
20
+ attr_accessor :timeout_seconds
21
+
22
+ attr_accessor :environment
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'command' => :'command',
28
+ :'timeout_seconds' => :'timeout_seconds',
29
+ :'environment' => :'environment'
30
+ }
31
+ end
32
+
33
+ # Returns attribute mapping this model knows about
34
+ def self.acceptable_attribute_map
35
+ attribute_map
36
+ end
37
+
38
+ # Returns all the JSON keys this model knows about
39
+ def self.acceptable_attributes
40
+ acceptable_attribute_map.values
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ def self.openapi_types
45
+ {
46
+ :'command' => :'String',
47
+ :'timeout_seconds' => :'Integer',
48
+ :'environment' => :'Hash<String, String>'
49
+ }
50
+ end
51
+
52
+ # List of attributes with nullable: true
53
+ def self.openapi_nullable
54
+ Set.new([
55
+ ])
56
+ end
57
+
58
+ # Initializes the object
59
+ # @param [Hash] attributes Model attributes in the form of hash
60
+ def initialize(attributes = {})
61
+ if (!attributes.is_a?(Hash))
62
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::SandboxCommandRequest` initialize method"
63
+ end
64
+
65
+ # check to see if the attribute exists and convert string to symbol for hash key
66
+ acceptable_attribute_map = self.class.acceptable_attribute_map
67
+ attributes = attributes.each_with_object({}) { |(k, v), h|
68
+ if (!acceptable_attribute_map.key?(k.to_sym))
69
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::SandboxCommandRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
70
+ end
71
+ h[k.to_sym] = v
72
+ }
73
+
74
+ if attributes.key?(:'command')
75
+ self.command = attributes[:'command']
76
+ else
77
+ self.command = nil
78
+ end
79
+
80
+ if attributes.key?(:'timeout_seconds')
81
+ self.timeout_seconds = attributes[:'timeout_seconds']
82
+ else
83
+ self.timeout_seconds = 60
84
+ end
85
+
86
+ if attributes.key?(:'environment')
87
+ if (value = attributes[:'environment']).is_a?(Hash)
88
+ self.environment = value
89
+ end
90
+ end
91
+ end
92
+
93
+ # Show invalid properties with the reasons. Usually used together with valid?
94
+ # @return Array for valid properties with the reasons
95
+ def list_invalid_properties
96
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
97
+ invalid_properties = Array.new
98
+ if @command.nil?
99
+ invalid_properties.push('invalid value for "command", command cannot be nil.')
100
+ end
101
+
102
+ if @command.to_s.length > 65536
103
+ invalid_properties.push('invalid value for "command", the character length must be smaller than or equal to 65536.')
104
+ end
105
+
106
+ if @command.to_s.length < 1
107
+ invalid_properties.push('invalid value for "command", the character length must be greater than or equal to 1.')
108
+ end
109
+
110
+ if !@timeout_seconds.nil? && @timeout_seconds > 3600
111
+ invalid_properties.push('invalid value for "timeout_seconds", must be smaller than or equal to 3600.')
112
+ end
113
+
114
+ if !@timeout_seconds.nil? && @timeout_seconds < 1
115
+ invalid_properties.push('invalid value for "timeout_seconds", must be greater than or equal to 1.')
116
+ end
117
+
118
+ if !@environment.nil? && @environment.length > 64
119
+ invalid_properties.push('invalid value for "environment", number of items must be less than or equal to 64.')
120
+ end
121
+
122
+ invalid_properties
123
+ end
124
+
125
+ # Check to see if the all the properties in the model are valid
126
+ # @return true if the model is valid
127
+ def valid?
128
+ warn '[DEPRECATED] the `valid?` method is obsolete'
129
+ return false if @command.nil?
130
+ return false if @command.to_s.length > 65536
131
+ return false if @command.to_s.length < 1
132
+ return false if !@timeout_seconds.nil? && @timeout_seconds > 3600
133
+ return false if !@timeout_seconds.nil? && @timeout_seconds < 1
134
+ return false if !@environment.nil? && @environment.length > 64
135
+ true
136
+ end
137
+
138
+ # Custom attribute writer method with validation
139
+ # @param [Object] command Value to be assigned
140
+ def command=(command)
141
+ if command.nil?
142
+ fail ArgumentError, 'command cannot be nil'
143
+ end
144
+
145
+ if command.to_s.length > 65536
146
+ fail ArgumentError, 'invalid value for "command", the character length must be smaller than or equal to 65536.'
147
+ end
148
+
149
+ if command.to_s.length < 1
150
+ fail ArgumentError, 'invalid value for "command", the character length must be greater than or equal to 1.'
151
+ end
152
+
153
+ @command = command
154
+ end
155
+
156
+ # Custom attribute writer method with validation
157
+ # @param [Object] timeout_seconds Value to be assigned
158
+ def timeout_seconds=(timeout_seconds)
159
+ if timeout_seconds.nil?
160
+ fail ArgumentError, 'timeout_seconds cannot be nil'
161
+ end
162
+
163
+ if timeout_seconds > 3600
164
+ fail ArgumentError, 'invalid value for "timeout_seconds", must be smaller than or equal to 3600.'
165
+ end
166
+
167
+ if timeout_seconds < 1
168
+ fail ArgumentError, 'invalid value for "timeout_seconds", must be greater than or equal to 1.'
169
+ end
170
+
171
+ @timeout_seconds = timeout_seconds
172
+ end
173
+
174
+ # Custom attribute writer method with validation
175
+ # @param [Object] environment Value to be assigned
176
+ def environment=(environment)
177
+ if environment.nil?
178
+ fail ArgumentError, 'environment cannot be nil'
179
+ end
180
+
181
+ if environment.length > 64
182
+ fail ArgumentError, 'invalid value for "environment", number of items must be less than or equal to 64.'
183
+ end
184
+
185
+ @environment = environment
186
+ end
187
+
188
+ # Checks equality by comparing each attribute.
189
+ # @param [Object] Object to be compared
190
+ def ==(o)
191
+ return true if self.equal?(o)
192
+ self.class == o.class &&
193
+ command == o.command &&
194
+ timeout_seconds == o.timeout_seconds &&
195
+ environment == o.environment
196
+ end
197
+
198
+ # @see the `==` method
199
+ # @param [Object] Object to be compared
200
+ def eql?(o)
201
+ self == o
202
+ end
203
+
204
+ # Calculates hash code according to all attributes.
205
+ # @return [Integer] Hash code
206
+ def hash
207
+ [command, timeout_seconds, environment].hash
208
+ end
209
+
210
+ # Builds the object from hash
211
+ # @param [Hash] attributes Model attributes in the form of hash
212
+ # @return [Object] Returns the model itself
213
+ def self.build_from_hash(attributes)
214
+ return nil unless attributes.is_a?(Hash)
215
+ attributes = attributes.transform_keys(&:to_sym)
216
+ transformed_hash = {}
217
+ openapi_types.each_pair do |key, type|
218
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
219
+ transformed_hash["#{key}"] = nil
220
+ elsif type =~ /\AArray<(.*)>/i
221
+ # check to ensure the input is an array given that the attribute
222
+ # is documented as an array but the input is not
223
+ if attributes[attribute_map[key]].is_a?(Array)
224
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
225
+ end
226
+ elsif !attributes[attribute_map[key]].nil?
227
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
228
+ end
229
+ end
230
+ new(transformed_hash)
231
+ end
232
+
233
+ # Returns the object in the form of hash
234
+ # @return [Hash] Returns the object in the form of hash
235
+ def to_hash
236
+ hash = {}
237
+ self.class.attribute_map.each_pair do |attr, param|
238
+ value = self.send(attr)
239
+ if value.nil?
240
+ is_nullable = self.class.openapi_nullable.include?(attr)
241
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
242
+ end
243
+
244
+ hash[param] = _to_hash(value)
245
+ end
246
+ hash
247
+ end
248
+
249
+ end
250
+
251
+ end