volcano-sdk 0.34.0 → 0.35.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.
- checksums.yaml +4 -4
- data/README.md +53 -4
- data/lib/volcano/client.rb +1 -1
- data/lib/volcano/durable.rb +9 -4
- data/lib/volcano/durable_approval_models.rb +1 -1
- data/lib/volcano/durable_message_arguments.rb +49 -0
- data/lib/volcano/durable_message_backlog.rb +38 -0
- data/lib/volcano/durable_message_catch_ups.rb +112 -0
- data/lib/volcano/durable_message_models.rb +62 -0
- data/lib/volcano/durable_message_responses.rb +107 -0
- data/lib/volcano/durable_message_session.rb +72 -0
- data/lib/volcano/durable_message_stream.rb +176 -0
- data/lib/volcano/durable_messages.rb +217 -0
- data/lib/volcano/durable_models.rb +32 -3
- data/lib/volcano/generated/lib/volcano-generated/api/auth_admin_api.rb +2 -2
- data/lib/volcano/generated/lib/volcano-generated/api/auth_configuration_api.rb +2 -2
- data/lib/volcano/generated/lib/volcano-generated/api/autofix_api.rb +222 -0
- data/lib/volcano/generated/lib/volcano-generated/api/durable_functions_api.rb +725 -0
- data/lib/volcano/generated/lib/volcano-generated/api/frontends_api.rb +2 -2
- data/lib/volcano/generated/lib/volcano-generated/api/issues_api.rb +254 -0
- data/lib/volcano/generated/lib/volcano-generated/api/sandboxes_api.rb +20 -20
- data/lib/volcano/generated/lib/volcano-generated/api/system_api.rb +57 -0
- data/lib/volcano/generated/lib/volcano-generated/api/variable_environments_api.rb +373 -0
- data/lib/volcano/generated/lib/volcano-generated/api/verified_domains_api.rb +2 -2
- data/lib/volcano/generated/lib/volcano-generated/models/auth_config.rb +46 -4
- data/lib/volcano/generated/lib/volcano-generated/models/auth_insights_series_point.rb +110 -2
- data/lib/volcano/generated/lib/volcano-generated/models/autofix_model.rb +45 -0
- data/lib/volcano/generated/lib/volcano-generated/models/autofix_provider.rb +40 -0
- data/lib/volcano/generated/lib/volcano-generated/models/autofix_settings.rb +385 -0
- data/lib/volcano/generated/lib/volcano-generated/models/autofix_stage.rb +40 -0
- data/lib/volcano/generated/lib/volcano-generated/models/capability.rb +214 -0
- data/lib/volcano/generated/lib/volcano-generated/models/capability_list.rb +166 -0
- data/lib/volcano/generated/lib/volcano-generated/models/capability_status.rb +40 -0
- data/lib/volcano/generated/lib/volcano-generated/models/create_sandbox_session_request.rb +16 -53
- data/lib/volcano/generated/lib/volcano-generated/models/create_variable_environment_request.rb +176 -0
- data/lib/volcano/generated/lib/volcano-generated/models/durable_execution.rb +14 -4
- data/lib/volcano/generated/lib/volcano-generated/models/durable_message.rb +396 -0
- data/lib/volcano/generated/lib/volcano-generated/models/durable_message_direction.rb +40 -0
- data/lib/volcano/generated/lib/volcano-generated/models/durable_message_list.rb +194 -0
- data/lib/volcano/generated/lib/volcano-generated/models/durable_message_sender.rb +203 -0
- data/lib/volcano/generated/lib/volcano-generated/models/durable_message_session_registration.rb +165 -0
- data/lib/volcano/generated/lib/volcano-generated/models/durable_message_status.rb +43 -0
- data/lib/volcano/generated/lib/volcano-generated/models/durable_message_wait.rb +278 -0
- data/lib/volcano/generated/lib/volcano-generated/models/durable_message_wait_list.rb +167 -0
- data/lib/volcano/generated/lib/volcano-generated/models/durable_message_wait_registration.rb +225 -0
- data/lib/volcano/generated/lib/volcano-generated/models/durable_message_wait_status.rb +43 -0
- data/lib/volcano/generated/lib/volcano-generated/models/frontend.rb +11 -1
- data/lib/volcano/generated/lib/volcano-generated/models/frontend_custom_domain_conflict_error.rb +1 -1
- data/lib/volcano/generated/lib/volcano-generated/models/frontend_custom_domain_response.rb +25 -2
- data/lib/volcano/generated/lib/volcano-generated/models/issue.rb +493 -0
- data/lib/volcano/generated/lib/volcano-generated/models/issue_status.rb +41 -0
- data/lib/volcano/generated/lib/volcano-generated/models/metric_usage_data.rb +1 -1
- data/lib/volcano/generated/lib/volcano-generated/models/open_durable_message_session_request.rb +228 -0
- data/lib/volcano/generated/lib/volcano-generated/models/paginated_issues.rb +230 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config.rb +10 -1
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_autofix.rb +206 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_custom_domain.rb +1 -1
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_sandbox.rb +12 -50
- data/lib/volcano/generated/lib/volcano-generated/models/project_frontend_custom_domain.rb +25 -2
- data/lib/volcano/generated/lib/volcano-generated/models/publish_durable_message_request.rb +205 -0
- data/lib/volcano/generated/lib/volcano-generated/models/register_durable_message_wait_request.rb +284 -0
- data/lib/volcano/generated/lib/volcano-generated/models/rename_variable_environment_request.rb +176 -0
- data/lib/volcano/generated/lib/volcano-generated/models/request_durable_approval_request.rb +1 -1
- data/lib/volcano/generated/lib/volcano-generated/models/sandbox_command_request.rb +11 -12
- data/lib/volcano/generated/lib/volcano-generated/models/sandbox_execution_request.rb +51 -13
- data/lib/volcano/generated/lib/volcano-generated/models/sandbox_session.rb +4 -30
- data/lib/volcano/generated/lib/volcano-generated/models/send_durable_message_request.rb +205 -0
- data/lib/volcano/generated/lib/volcano-generated/models/update_auth_config_request.rb +79 -1
- data/lib/volcano/generated/lib/volcano-generated/models/update_autofix_settings_request.rb +273 -0
- data/lib/volcano/generated/lib/volcano-generated/models/update_issue_request.rb +186 -0
- data/lib/volcano/generated/lib/volcano-generated/models/variable_environment.rb +325 -0
- data/lib/volcano/generated/lib/volcano-generated/models/variable_environment_list.rb +175 -0
- data/lib/volcano/generated/lib/volcano-generated.rb +34 -0
- data/lib/volcano/generated_transport.rb +1 -0
- data/lib/volcano/generated_transport_durable_messages.rb +57 -0
- data/lib/volcano/realtime/channel_callbacks.rb +5 -1
- data/lib/volcano/realtime/channel_lifecycle.rb +4 -1
- data/lib/volcano/realtime/durable_channel.rb +47 -0
- data/lib/volcano/realtime/lifecycle.rb +37 -1
- data/lib/volcano/realtime/protocol.rb +7 -3
- data/lib/volcano/realtime/protocol_dispatch.rb +1 -1
- data/lib/volcano/realtime/protocol_io.rb +7 -4
- data/lib/volcano/realtime/protocol_lifecycle.rb +7 -0
- data/lib/volcano/realtime/protocol_recovery.rb +23 -12
- data/lib/volcano/realtime.rb +42 -8
- data/lib/volcano/redaction.rb +1 -1
- data/lib/volcano/version.rb +1 -1
- data/lib/volcano.rb +8 -0
- data/sig/core_facades.rbs +15 -0
- data/sig/durable_message_records.rbs +68 -0
- data/sig/durable_records.rbs +17 -9
- metadata +46 -1
data/lib/volcano/generated/lib/volcano-generated/models/register_durable_message_wait_request.rb
ADDED
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Volcano API
|
|
3
|
+
|
|
4
|
+
#Public API for Volcano 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 RegisterDurableMessageWaitRequest < ApiModelBase
|
|
18
|
+
# Opaque reference to the running execution, supplied by the SDK.
|
|
19
|
+
attr_accessor :execution_ref
|
|
20
|
+
|
|
21
|
+
# Opaque wait reference, supplied by the SDK.
|
|
22
|
+
attr_accessor :callback_id
|
|
23
|
+
|
|
24
|
+
# The name a workflow waits on or publishes under: up to 237 printable ASCII characters.
|
|
25
|
+
attr_accessor :name
|
|
26
|
+
|
|
27
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
28
|
+
def self.attribute_map
|
|
29
|
+
{
|
|
30
|
+
:'execution_ref' => :'execution_ref',
|
|
31
|
+
:'callback_id' => :'callback_id',
|
|
32
|
+
:'name' => :'name'
|
|
33
|
+
}
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Returns attribute mapping this model knows about
|
|
37
|
+
def self.acceptable_attribute_map
|
|
38
|
+
attribute_map
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Returns all the JSON keys this model knows about
|
|
42
|
+
def self.acceptable_attributes
|
|
43
|
+
acceptable_attribute_map.values
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Attribute type mapping.
|
|
47
|
+
def self.openapi_types
|
|
48
|
+
{
|
|
49
|
+
:'execution_ref' => :'String',
|
|
50
|
+
:'callback_id' => :'String',
|
|
51
|
+
:'name' => :'String'
|
|
52
|
+
}
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# List of attributes with nullable: true
|
|
56
|
+
def self.openapi_nullable
|
|
57
|
+
Set.new([
|
|
58
|
+
])
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# Initializes the object
|
|
62
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
63
|
+
def initialize(attributes = {})
|
|
64
|
+
if (!attributes.is_a?(Hash))
|
|
65
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::RegisterDurableMessageWaitRequest` initialize method"
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
69
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
70
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
71
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
72
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::RegisterDurableMessageWaitRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
73
|
+
end
|
|
74
|
+
h[k.to_sym] = v
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
if attributes.key?(:'execution_ref')
|
|
78
|
+
self.execution_ref = attributes[:'execution_ref']
|
|
79
|
+
else
|
|
80
|
+
self.execution_ref = nil
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
if attributes.key?(:'callback_id')
|
|
84
|
+
self.callback_id = attributes[:'callback_id']
|
|
85
|
+
else
|
|
86
|
+
self.callback_id = nil
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
if attributes.key?(:'name')
|
|
90
|
+
self.name = attributes[:'name']
|
|
91
|
+
else
|
|
92
|
+
self.name = nil
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
97
|
+
# @return Array for valid properties with the reasons
|
|
98
|
+
def list_invalid_properties
|
|
99
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
100
|
+
invalid_properties = Array.new
|
|
101
|
+
if @execution_ref.nil?
|
|
102
|
+
invalid_properties.push('invalid value for "execution_ref", execution_ref cannot be nil.')
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
if @execution_ref.to_s.length > 2048
|
|
106
|
+
invalid_properties.push('invalid value for "execution_ref", the character length must be smaller than or equal to 2048.')
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
if @execution_ref.to_s.length < 1
|
|
110
|
+
invalid_properties.push('invalid value for "execution_ref", the character length must be greater than or equal to 1.')
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
if @callback_id.nil?
|
|
114
|
+
invalid_properties.push('invalid value for "callback_id", callback_id cannot be nil.')
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
if @callback_id.to_s.length > 1024
|
|
118
|
+
invalid_properties.push('invalid value for "callback_id", the character length must be smaller than or equal to 1024.')
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
if @callback_id.to_s.length < 1
|
|
122
|
+
invalid_properties.push('invalid value for "callback_id", the character length must be greater than or equal to 1.')
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
if @name.nil?
|
|
126
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
if @name.to_s.length > 237
|
|
130
|
+
invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 237.')
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
if @name.to_s.length < 1
|
|
134
|
+
invalid_properties.push('invalid value for "name", the character length must be greater than or equal to 1.')
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
pattern = Regexp.new(/^[ -~]+$/)
|
|
138
|
+
if @name !~ pattern
|
|
139
|
+
invalid_properties.push("invalid value for \"name\", must conform to the pattern #{pattern}.")
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
invalid_properties
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# Check to see if the all the properties in the model are valid
|
|
146
|
+
# @return true if the model is valid
|
|
147
|
+
def valid?
|
|
148
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
149
|
+
return false if @execution_ref.nil?
|
|
150
|
+
return false if @execution_ref.to_s.length > 2048
|
|
151
|
+
return false if @execution_ref.to_s.length < 1
|
|
152
|
+
return false if @callback_id.nil?
|
|
153
|
+
return false if @callback_id.to_s.length > 1024
|
|
154
|
+
return false if @callback_id.to_s.length < 1
|
|
155
|
+
return false if @name.nil?
|
|
156
|
+
return false if @name.to_s.length > 237
|
|
157
|
+
return false if @name.to_s.length < 1
|
|
158
|
+
return false if @name !~ Regexp.new(/^[ -~]+$/)
|
|
159
|
+
true
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
# Custom attribute writer method with validation
|
|
163
|
+
# @param [Object] execution_ref Value to be assigned
|
|
164
|
+
def execution_ref=(execution_ref)
|
|
165
|
+
if execution_ref.nil?
|
|
166
|
+
fail ArgumentError, 'execution_ref cannot be nil'
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
if execution_ref.to_s.length > 2048
|
|
170
|
+
fail ArgumentError, 'invalid value for "execution_ref", the character length must be smaller than or equal to 2048.'
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
if execution_ref.to_s.length < 1
|
|
174
|
+
fail ArgumentError, 'invalid value for "execution_ref", the character length must be greater than or equal to 1.'
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
@execution_ref = execution_ref
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
# Custom attribute writer method with validation
|
|
181
|
+
# @param [Object] callback_id Value to be assigned
|
|
182
|
+
def callback_id=(callback_id)
|
|
183
|
+
if callback_id.nil?
|
|
184
|
+
fail ArgumentError, 'callback_id cannot be nil'
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
if callback_id.to_s.length > 1024
|
|
188
|
+
fail ArgumentError, 'invalid value for "callback_id", the character length must be smaller than or equal to 1024.'
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
if callback_id.to_s.length < 1
|
|
192
|
+
fail ArgumentError, 'invalid value for "callback_id", the character length must be greater than or equal to 1.'
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
@callback_id = callback_id
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
# Custom attribute writer method with validation
|
|
199
|
+
# @param [Object] name Value to be assigned
|
|
200
|
+
def name=(name)
|
|
201
|
+
if name.nil?
|
|
202
|
+
fail ArgumentError, 'name cannot be nil'
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
if name.to_s.length > 237
|
|
206
|
+
fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 237.'
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
if name.to_s.length < 1
|
|
210
|
+
fail ArgumentError, 'invalid value for "name", the character length must be greater than or equal to 1.'
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
pattern = Regexp.new(/^[ -~]+$/)
|
|
214
|
+
if name !~ pattern
|
|
215
|
+
fail ArgumentError, "invalid value for \"name\", must conform to the pattern #{pattern}."
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
@name = name
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
# Checks equality by comparing each attribute.
|
|
222
|
+
# @param [Object] Object to be compared
|
|
223
|
+
def ==(o)
|
|
224
|
+
return true if self.equal?(o)
|
|
225
|
+
self.class == o.class &&
|
|
226
|
+
execution_ref == o.execution_ref &&
|
|
227
|
+
callback_id == o.callback_id &&
|
|
228
|
+
name == o.name
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
# @see the `==` method
|
|
232
|
+
# @param [Object] Object to be compared
|
|
233
|
+
def eql?(o)
|
|
234
|
+
self == o
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
# Calculates hash code according to all attributes.
|
|
238
|
+
# @return [Integer] Hash code
|
|
239
|
+
def hash
|
|
240
|
+
[execution_ref, callback_id, name].hash
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
# Builds the object from hash
|
|
244
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
245
|
+
# @return [Object] Returns the model itself
|
|
246
|
+
def self.build_from_hash(attributes)
|
|
247
|
+
return nil unless attributes.is_a?(Hash)
|
|
248
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
249
|
+
transformed_hash = {}
|
|
250
|
+
openapi_types.each_pair do |key, type|
|
|
251
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
252
|
+
transformed_hash["#{key}"] = nil
|
|
253
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
254
|
+
# check to ensure the input is an array given that the attribute
|
|
255
|
+
# is documented as an array but the input is not
|
|
256
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
257
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
258
|
+
end
|
|
259
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
260
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
261
|
+
end
|
|
262
|
+
end
|
|
263
|
+
new(transformed_hash)
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
# Returns the object in the form of hash
|
|
267
|
+
# @return [Hash] Returns the object in the form of hash
|
|
268
|
+
def to_hash
|
|
269
|
+
hash = {}
|
|
270
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
271
|
+
value = self.send(attr)
|
|
272
|
+
if value.nil?
|
|
273
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
274
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
275
|
+
end
|
|
276
|
+
|
|
277
|
+
hash[param] = _to_hash(value)
|
|
278
|
+
end
|
|
279
|
+
hash
|
|
280
|
+
end
|
|
281
|
+
|
|
282
|
+
end
|
|
283
|
+
|
|
284
|
+
end
|
data/lib/volcano/generated/lib/volcano-generated/models/rename_variable_environment_request.rb
ADDED
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Volcano API
|
|
3
|
+
|
|
4
|
+
#Public API for Volcano 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 RenameVariableEnvironmentRequest < ApiModelBase
|
|
18
|
+
# Leading and trailing ASCII whitespace is trimmed before validating 1–64 ASCII letters, digits, underscores, or hyphens. Global is reserved.
|
|
19
|
+
attr_accessor :name
|
|
20
|
+
|
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
22
|
+
def self.attribute_map
|
|
23
|
+
{
|
|
24
|
+
:'name' => :'name'
|
|
25
|
+
}
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# Returns attribute mapping this model knows about
|
|
29
|
+
def self.acceptable_attribute_map
|
|
30
|
+
attribute_map
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Returns all the JSON keys this model knows about
|
|
34
|
+
def self.acceptable_attributes
|
|
35
|
+
acceptable_attribute_map.values
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Attribute type mapping.
|
|
39
|
+
def self.openapi_types
|
|
40
|
+
{
|
|
41
|
+
:'name' => :'String'
|
|
42
|
+
}
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# List of attributes with nullable: true
|
|
46
|
+
def self.openapi_nullable
|
|
47
|
+
Set.new([
|
|
48
|
+
])
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Initializes the object
|
|
52
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
53
|
+
def initialize(attributes = {})
|
|
54
|
+
if (!attributes.is_a?(Hash))
|
|
55
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::RenameVariableEnvironmentRequest` initialize method"
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
59
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
60
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
61
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
62
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::RenameVariableEnvironmentRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
63
|
+
end
|
|
64
|
+
h[k.to_sym] = v
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if attributes.key?(:'name')
|
|
68
|
+
self.name = attributes[:'name']
|
|
69
|
+
else
|
|
70
|
+
self.name = nil
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
75
|
+
# @return Array for valid properties with the reasons
|
|
76
|
+
def list_invalid_properties
|
|
77
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
78
|
+
invalid_properties = Array.new
|
|
79
|
+
if @name.nil?
|
|
80
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
pattern = Regexp.new(/^[ \t\n\f\r]*[A-Za-z0-9_-]{1,64}[ \t\n\f\r]*$/)
|
|
84
|
+
if @name !~ pattern
|
|
85
|
+
invalid_properties.push("invalid value for \"name\", must conform to the pattern #{pattern}.")
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
invalid_properties
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# Check to see if the all the properties in the model are valid
|
|
92
|
+
# @return true if the model is valid
|
|
93
|
+
def valid?
|
|
94
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
95
|
+
return false if @name.nil?
|
|
96
|
+
return false if @name !~ Regexp.new(/^[ \t\n\f\r]*[A-Za-z0-9_-]{1,64}[ \t\n\f\r]*$/)
|
|
97
|
+
true
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# Custom attribute writer method with validation
|
|
101
|
+
# @param [Object] name Value to be assigned
|
|
102
|
+
def name=(name)
|
|
103
|
+
if name.nil?
|
|
104
|
+
fail ArgumentError, 'name cannot be nil'
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
pattern = Regexp.new(/^[ \t\n\f\r]*[A-Za-z0-9_-]{1,64}[ \t\n\f\r]*$/)
|
|
108
|
+
if name !~ pattern
|
|
109
|
+
fail ArgumentError, "invalid value for \"name\", must conform to the pattern #{pattern}."
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
@name = name
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# Checks equality by comparing each attribute.
|
|
116
|
+
# @param [Object] Object to be compared
|
|
117
|
+
def ==(o)
|
|
118
|
+
return true if self.equal?(o)
|
|
119
|
+
self.class == o.class &&
|
|
120
|
+
name == o.name
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# @see the `==` method
|
|
124
|
+
# @param [Object] Object to be compared
|
|
125
|
+
def eql?(o)
|
|
126
|
+
self == o
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# Calculates hash code according to all attributes.
|
|
130
|
+
# @return [Integer] Hash code
|
|
131
|
+
def hash
|
|
132
|
+
[name].hash
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
# Builds the object from hash
|
|
136
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
137
|
+
# @return [Object] Returns the model itself
|
|
138
|
+
def self.build_from_hash(attributes)
|
|
139
|
+
return nil unless attributes.is_a?(Hash)
|
|
140
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
141
|
+
transformed_hash = {}
|
|
142
|
+
openapi_types.each_pair do |key, type|
|
|
143
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
144
|
+
transformed_hash["#{key}"] = nil
|
|
145
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
146
|
+
# check to ensure the input is an array given that the attribute
|
|
147
|
+
# is documented as an array but the input is not
|
|
148
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
149
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
150
|
+
end
|
|
151
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
152
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
153
|
+
end
|
|
154
|
+
end
|
|
155
|
+
new(transformed_hash)
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
# Returns the object in the form of hash
|
|
159
|
+
# @return [Hash] Returns the object in the form of hash
|
|
160
|
+
def to_hash
|
|
161
|
+
hash = {}
|
|
162
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
163
|
+
value = self.send(attr)
|
|
164
|
+
if value.nil?
|
|
165
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
166
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
hash[param] = _to_hash(value)
|
|
170
|
+
end
|
|
171
|
+
hash
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
end
|
|
@@ -27,7 +27,7 @@ module Volcano::Generated
|
|
|
27
27
|
|
|
28
28
|
attr_accessor :description
|
|
29
29
|
|
|
30
|
-
# Any JSON value to show the person deciding. The whole request is limited to 64 KiB.
|
|
30
|
+
# Any JSON value to show the person deciding. A number's exponent must be between -324 and 324, and a number too large or too precise to store is refused with `400`. Numbers are read back written out in full, so the exponents' absolute values may total at most 65,536. The whole request is limited to 64 KiB.
|
|
31
31
|
attr_accessor :details
|
|
32
32
|
|
|
33
33
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -17,6 +17,7 @@ module Volcano::Generated
|
|
|
17
17
|
class SandboxCommandRequest < ApiModelBase
|
|
18
18
|
attr_accessor :command
|
|
19
19
|
|
|
20
|
+
# Command execution time from process start. Cloud defaults to 60 seconds and accepts 1–28800; local defaults to 0 (unlimited) and accepts nonnegative values. VM expiry always takes precedence. Cloud synchronous requests must return within the public connection idle limit (1000 seconds); use a session with a background process and short polling requests for longer work.
|
|
20
21
|
attr_accessor :timeout_seconds
|
|
21
22
|
|
|
22
23
|
attr_accessor :environment
|
|
@@ -79,8 +80,6 @@ module Volcano::Generated
|
|
|
79
80
|
|
|
80
81
|
if attributes.key?(:'timeout_seconds')
|
|
81
82
|
self.timeout_seconds = attributes[:'timeout_seconds']
|
|
82
|
-
else
|
|
83
|
-
self.timeout_seconds = 60
|
|
84
83
|
end
|
|
85
84
|
|
|
86
85
|
if attributes.key?(:'environment')
|
|
@@ -107,12 +106,12 @@ module Volcano::Generated
|
|
|
107
106
|
invalid_properties.push('invalid value for "command", the character length must be greater than or equal to 1.')
|
|
108
107
|
end
|
|
109
108
|
|
|
110
|
-
if !@timeout_seconds.nil? && @timeout_seconds >
|
|
111
|
-
invalid_properties.push('invalid value for "timeout_seconds", must be smaller than or equal to
|
|
109
|
+
if !@timeout_seconds.nil? && @timeout_seconds > 2147483647
|
|
110
|
+
invalid_properties.push('invalid value for "timeout_seconds", must be smaller than or equal to 2147483647.')
|
|
112
111
|
end
|
|
113
112
|
|
|
114
|
-
if !@timeout_seconds.nil? && @timeout_seconds <
|
|
115
|
-
invalid_properties.push('invalid value for "timeout_seconds", must be greater than or equal to
|
|
113
|
+
if !@timeout_seconds.nil? && @timeout_seconds < 0
|
|
114
|
+
invalid_properties.push('invalid value for "timeout_seconds", must be greater than or equal to 0.')
|
|
116
115
|
end
|
|
117
116
|
|
|
118
117
|
if !@environment.nil? && @environment.length > 64
|
|
@@ -129,8 +128,8 @@ module Volcano::Generated
|
|
|
129
128
|
return false if @command.nil?
|
|
130
129
|
return false if @command.to_s.length > 65536
|
|
131
130
|
return false if @command.to_s.length < 1
|
|
132
|
-
return false if !@timeout_seconds.nil? && @timeout_seconds >
|
|
133
|
-
return false if !@timeout_seconds.nil? && @timeout_seconds <
|
|
131
|
+
return false if !@timeout_seconds.nil? && @timeout_seconds > 2147483647
|
|
132
|
+
return false if !@timeout_seconds.nil? && @timeout_seconds < 0
|
|
134
133
|
return false if !@environment.nil? && @environment.length > 64
|
|
135
134
|
true
|
|
136
135
|
end
|
|
@@ -160,12 +159,12 @@ module Volcano::Generated
|
|
|
160
159
|
fail ArgumentError, 'timeout_seconds cannot be nil'
|
|
161
160
|
end
|
|
162
161
|
|
|
163
|
-
if timeout_seconds >
|
|
164
|
-
fail ArgumentError, 'invalid value for "timeout_seconds", must be smaller than or equal to
|
|
162
|
+
if timeout_seconds > 2147483647
|
|
163
|
+
fail ArgumentError, 'invalid value for "timeout_seconds", must be smaller than or equal to 2147483647.'
|
|
165
164
|
end
|
|
166
165
|
|
|
167
|
-
if timeout_seconds <
|
|
168
|
-
fail ArgumentError, 'invalid value for "timeout_seconds", must be greater than or equal to
|
|
166
|
+
if timeout_seconds < 0
|
|
167
|
+
fail ArgumentError, 'invalid value for "timeout_seconds", must be greater than or equal to 0.'
|
|
169
168
|
end
|
|
170
169
|
|
|
171
170
|
@timeout_seconds = timeout_seconds
|
|
@@ -20,13 +20,18 @@ module Volcano::Generated
|
|
|
20
20
|
|
|
21
21
|
attr_accessor :sandbox_id
|
|
22
22
|
|
|
23
|
+
# Baseline memory in MiB. Cloud HOBBY supports 1024; SUPERAGENT supports 1024 or 2048. Omission uses the preset or template default; a template requiring more than the plan permits is rejected. Local sessions are exempt from cloud plan limits.
|
|
23
24
|
attr_accessor :memory_mb
|
|
24
25
|
|
|
25
26
|
# Region such as `us-east-1`. Region IDs issued by earlier versions of the API are still accepted.
|
|
26
27
|
attr_accessor :region
|
|
27
28
|
|
|
29
|
+
# Absolute VM lifetime including startup, bounded by environment capacity policy. Inherits the template TTL when omitted (cloud default 3600 seconds; local default 0, unlimited). Cloud HOBBY accepts 30–3600 seconds; SUPERAGENT accepts 30–28800 seconds. Inherited template defaults are clamped to the plan limit; explicit values above it are rejected. Local accepts 0 for unlimited or a positive lifetime. The VM is reclaimed early when the command finishes.
|
|
30
|
+
attr_accessor :max_duration_seconds
|
|
31
|
+
|
|
28
32
|
attr_accessor :command
|
|
29
33
|
|
|
34
|
+
# Command execution time from process start. Cloud defaults to 60 seconds and accepts 1–28800; local defaults to 0 (unlimited) and accepts nonnegative values. VM expiry always takes precedence. Cloud synchronous requests must return within the public connection idle limit (1000 seconds); use a session with a background process and short polling requests for longer work.
|
|
30
35
|
attr_accessor :timeout_seconds
|
|
31
36
|
|
|
32
37
|
attr_accessor :environment
|
|
@@ -38,6 +43,7 @@ module Volcano::Generated
|
|
|
38
43
|
:'sandbox_id' => :'sandbox_id',
|
|
39
44
|
:'memory_mb' => :'memory_mb',
|
|
40
45
|
:'region' => :'region',
|
|
46
|
+
:'max_duration_seconds' => :'max_duration_seconds',
|
|
41
47
|
:'command' => :'command',
|
|
42
48
|
:'timeout_seconds' => :'timeout_seconds',
|
|
43
49
|
:'environment' => :'environment'
|
|
@@ -61,6 +67,7 @@ module Volcano::Generated
|
|
|
61
67
|
:'sandbox_id' => :'String',
|
|
62
68
|
:'memory_mb' => :'Integer',
|
|
63
69
|
:'region' => :'String',
|
|
70
|
+
:'max_duration_seconds' => :'Integer',
|
|
64
71
|
:'command' => :'String',
|
|
65
72
|
:'timeout_seconds' => :'Integer',
|
|
66
73
|
:'environment' => :'Hash<String, String>'
|
|
@@ -107,6 +114,10 @@ module Volcano::Generated
|
|
|
107
114
|
self.region = nil
|
|
108
115
|
end
|
|
109
116
|
|
|
117
|
+
if attributes.key?(:'max_duration_seconds')
|
|
118
|
+
self.max_duration_seconds = attributes[:'max_duration_seconds']
|
|
119
|
+
end
|
|
120
|
+
|
|
110
121
|
if attributes.key?(:'command')
|
|
111
122
|
self.command = attributes[:'command']
|
|
112
123
|
else
|
|
@@ -115,8 +126,6 @@ module Volcano::Generated
|
|
|
115
126
|
|
|
116
127
|
if attributes.key?(:'timeout_seconds')
|
|
117
128
|
self.timeout_seconds = attributes[:'timeout_seconds']
|
|
118
|
-
else
|
|
119
|
-
self.timeout_seconds = 60
|
|
120
129
|
end
|
|
121
130
|
|
|
122
131
|
if attributes.key?(:'environment')
|
|
@@ -140,6 +149,14 @@ module Volcano::Generated
|
|
|
140
149
|
invalid_properties.push("invalid value for \"region\", must conform to the pattern #{pattern}.")
|
|
141
150
|
end
|
|
142
151
|
|
|
152
|
+
if !@max_duration_seconds.nil? && @max_duration_seconds > 2147483647
|
|
153
|
+
invalid_properties.push('invalid value for "max_duration_seconds", must be smaller than or equal to 2147483647.')
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
if !@max_duration_seconds.nil? && @max_duration_seconds < 0
|
|
157
|
+
invalid_properties.push('invalid value for "max_duration_seconds", must be greater than or equal to 0.')
|
|
158
|
+
end
|
|
159
|
+
|
|
143
160
|
if @command.nil?
|
|
144
161
|
invalid_properties.push('invalid value for "command", command cannot be nil.')
|
|
145
162
|
end
|
|
@@ -152,12 +169,12 @@ module Volcano::Generated
|
|
|
152
169
|
invalid_properties.push('invalid value for "command", the character length must be greater than or equal to 1.')
|
|
153
170
|
end
|
|
154
171
|
|
|
155
|
-
if !@timeout_seconds.nil? && @timeout_seconds >
|
|
156
|
-
invalid_properties.push('invalid value for "timeout_seconds", must be smaller than or equal to
|
|
172
|
+
if !@timeout_seconds.nil? && @timeout_seconds > 2147483647
|
|
173
|
+
invalid_properties.push('invalid value for "timeout_seconds", must be smaller than or equal to 2147483647.')
|
|
157
174
|
end
|
|
158
175
|
|
|
159
|
-
if !@timeout_seconds.nil? && @timeout_seconds <
|
|
160
|
-
invalid_properties.push('invalid value for "timeout_seconds", must be greater than or equal to
|
|
176
|
+
if !@timeout_seconds.nil? && @timeout_seconds < 0
|
|
177
|
+
invalid_properties.push('invalid value for "timeout_seconds", must be greater than or equal to 0.')
|
|
161
178
|
end
|
|
162
179
|
|
|
163
180
|
if !@environment.nil? && @environment.length > 64
|
|
@@ -175,11 +192,13 @@ module Volcano::Generated
|
|
|
175
192
|
return false unless memory_mb_validator.valid?(@memory_mb)
|
|
176
193
|
return false if @region.nil?
|
|
177
194
|
return false if @region !~ Regexp.new(/^(aws-)?[a-z]{2}(-[a-z]+)+-[0-9]+$/)
|
|
195
|
+
return false if !@max_duration_seconds.nil? && @max_duration_seconds > 2147483647
|
|
196
|
+
return false if !@max_duration_seconds.nil? && @max_duration_seconds < 0
|
|
178
197
|
return false if @command.nil?
|
|
179
198
|
return false if @command.to_s.length > 65536
|
|
180
199
|
return false if @command.to_s.length < 1
|
|
181
|
-
return false if !@timeout_seconds.nil? && @timeout_seconds >
|
|
182
|
-
return false if !@timeout_seconds.nil? && @timeout_seconds <
|
|
200
|
+
return false if !@timeout_seconds.nil? && @timeout_seconds > 2147483647
|
|
201
|
+
return false if !@timeout_seconds.nil? && @timeout_seconds < 0
|
|
183
202
|
return false if !@environment.nil? && @environment.length > 64
|
|
184
203
|
true
|
|
185
204
|
end
|
|
@@ -209,6 +228,24 @@ module Volcano::Generated
|
|
|
209
228
|
@region = region
|
|
210
229
|
end
|
|
211
230
|
|
|
231
|
+
# Custom attribute writer method with validation
|
|
232
|
+
# @param [Object] max_duration_seconds Value to be assigned
|
|
233
|
+
def max_duration_seconds=(max_duration_seconds)
|
|
234
|
+
if max_duration_seconds.nil?
|
|
235
|
+
fail ArgumentError, 'max_duration_seconds cannot be nil'
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
if max_duration_seconds > 2147483647
|
|
239
|
+
fail ArgumentError, 'invalid value for "max_duration_seconds", must be smaller than or equal to 2147483647.'
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
if max_duration_seconds < 0
|
|
243
|
+
fail ArgumentError, 'invalid value for "max_duration_seconds", must be greater than or equal to 0.'
|
|
244
|
+
end
|
|
245
|
+
|
|
246
|
+
@max_duration_seconds = max_duration_seconds
|
|
247
|
+
end
|
|
248
|
+
|
|
212
249
|
# Custom attribute writer method with validation
|
|
213
250
|
# @param [Object] command Value to be assigned
|
|
214
251
|
def command=(command)
|
|
@@ -234,12 +271,12 @@ module Volcano::Generated
|
|
|
234
271
|
fail ArgumentError, 'timeout_seconds cannot be nil'
|
|
235
272
|
end
|
|
236
273
|
|
|
237
|
-
if timeout_seconds >
|
|
238
|
-
fail ArgumentError, 'invalid value for "timeout_seconds", must be smaller than or equal to
|
|
274
|
+
if timeout_seconds > 2147483647
|
|
275
|
+
fail ArgumentError, 'invalid value for "timeout_seconds", must be smaller than or equal to 2147483647.'
|
|
239
276
|
end
|
|
240
277
|
|
|
241
|
-
if timeout_seconds <
|
|
242
|
-
fail ArgumentError, 'invalid value for "timeout_seconds", must be greater than or equal to
|
|
278
|
+
if timeout_seconds < 0
|
|
279
|
+
fail ArgumentError, 'invalid value for "timeout_seconds", must be greater than or equal to 0.'
|
|
243
280
|
end
|
|
244
281
|
|
|
245
282
|
@timeout_seconds = timeout_seconds
|
|
@@ -268,6 +305,7 @@ module Volcano::Generated
|
|
|
268
305
|
sandbox_id == o.sandbox_id &&
|
|
269
306
|
memory_mb == o.memory_mb &&
|
|
270
307
|
region == o.region &&
|
|
308
|
+
max_duration_seconds == o.max_duration_seconds &&
|
|
271
309
|
command == o.command &&
|
|
272
310
|
timeout_seconds == o.timeout_seconds &&
|
|
273
311
|
environment == o.environment
|
|
@@ -282,7 +320,7 @@ module Volcano::Generated
|
|
|
282
320
|
# Calculates hash code according to all attributes.
|
|
283
321
|
# @return [Integer] Hash code
|
|
284
322
|
def hash
|
|
285
|
-
[preset, sandbox_id, memory_mb, region, command, timeout_seconds, environment].hash
|
|
323
|
+
[preset, sandbox_id, memory_mb, region, max_duration_seconds, command, timeout_seconds, environment].hash
|
|
286
324
|
end
|
|
287
325
|
|
|
288
326
|
# Builds the object from hash
|