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/create_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 CreateVariableEnvironmentRequest < 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::CreateVariableEnvironmentRequest` 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::CreateVariableEnvironmentRequest`. 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
|
|
@@ -40,6 +40,9 @@ module Volcano::Generated
|
|
|
40
40
|
# Present once the execution has reached a terminal status.
|
|
41
41
|
attr_accessor :completed_at
|
|
42
42
|
|
|
43
|
+
# Lets a browser read and send the execution's messages. Returned only by the start that created the execution, never by a repeat under the same name or by a read. Send it as `X-Volcano-Client-Token`.
|
|
44
|
+
attr_accessor :client_token
|
|
45
|
+
|
|
43
46
|
class EnumAttributeValidator
|
|
44
47
|
attr_reader :datatype
|
|
45
48
|
attr_reader :allowable_values
|
|
@@ -74,7 +77,8 @@ module Volcano::Generated
|
|
|
74
77
|
:'result_expired' => :'result_expired',
|
|
75
78
|
:'error' => :'error',
|
|
76
79
|
:'created_at' => :'created_at',
|
|
77
|
-
:'completed_at' => :'completed_at'
|
|
80
|
+
:'completed_at' => :'completed_at',
|
|
81
|
+
:'client_token' => :'client_token'
|
|
78
82
|
}
|
|
79
83
|
end
|
|
80
84
|
|
|
@@ -100,7 +104,8 @@ module Volcano::Generated
|
|
|
100
104
|
:'result_expired' => :'Boolean',
|
|
101
105
|
:'error' => :'DurableExecutionError',
|
|
102
106
|
:'created_at' => :'Time',
|
|
103
|
-
:'completed_at' => :'Time'
|
|
107
|
+
:'completed_at' => :'Time',
|
|
108
|
+
:'client_token' => :'String'
|
|
104
109
|
}
|
|
105
110
|
end
|
|
106
111
|
|
|
@@ -178,6 +183,10 @@ module Volcano::Generated
|
|
|
178
183
|
if attributes.key?(:'completed_at')
|
|
179
184
|
self.completed_at = attributes[:'completed_at']
|
|
180
185
|
end
|
|
186
|
+
|
|
187
|
+
if attributes.key?(:'client_token')
|
|
188
|
+
self.client_token = attributes[:'client_token']
|
|
189
|
+
end
|
|
181
190
|
end
|
|
182
191
|
|
|
183
192
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -299,7 +308,8 @@ module Volcano::Generated
|
|
|
299
308
|
result_expired == o.result_expired &&
|
|
300
309
|
error == o.error &&
|
|
301
310
|
created_at == o.created_at &&
|
|
302
|
-
completed_at == o.completed_at
|
|
311
|
+
completed_at == o.completed_at &&
|
|
312
|
+
client_token == o.client_token
|
|
303
313
|
end
|
|
304
314
|
|
|
305
315
|
# @see the `==` method
|
|
@@ -311,7 +321,7 @@ module Volcano::Generated
|
|
|
311
321
|
# Calculates hash code according to all attributes.
|
|
312
322
|
# @return [Integer] Hash code
|
|
313
323
|
def hash
|
|
314
|
-
[id, function_id, name, status, region, result, result_expired, error, created_at, completed_at].hash
|
|
324
|
+
[id, function_id, name, status, region, result, result_expired, error, created_at, completed_at, client_token].hash
|
|
315
325
|
end
|
|
316
326
|
|
|
317
327
|
# Builds the object from hash
|
|
@@ -0,0 +1,396 @@
|
|
|
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
|
+
# A message sent to, or published by, a durable execution.
|
|
18
|
+
class DurableMessage < ApiModelBase
|
|
19
|
+
attr_accessor :id
|
|
20
|
+
|
|
21
|
+
attr_accessor :execution_id
|
|
22
|
+
|
|
23
|
+
attr_accessor :direction
|
|
24
|
+
|
|
25
|
+
# Orders the execution's messages in both directions. It increases with every message but can skip numbers. Pass the last one you read as `after` to read what came next.
|
|
26
|
+
attr_accessor :seq
|
|
27
|
+
|
|
28
|
+
attr_accessor :name
|
|
29
|
+
|
|
30
|
+
# The JSON value sent or published, or null.
|
|
31
|
+
attr_accessor :data
|
|
32
|
+
|
|
33
|
+
attr_accessor :sender
|
|
34
|
+
|
|
35
|
+
attr_accessor :status
|
|
36
|
+
|
|
37
|
+
# When the execution received the message. Null until then, and for `out` messages.
|
|
38
|
+
attr_accessor :delivered_at
|
|
39
|
+
|
|
40
|
+
attr_accessor :sent_at
|
|
41
|
+
|
|
42
|
+
class EnumAttributeValidator
|
|
43
|
+
attr_reader :datatype
|
|
44
|
+
attr_reader :allowable_values
|
|
45
|
+
|
|
46
|
+
def initialize(datatype, allowable_values)
|
|
47
|
+
@allowable_values = allowable_values.map do |value|
|
|
48
|
+
case datatype.to_s
|
|
49
|
+
when /Integer/i
|
|
50
|
+
value.to_i
|
|
51
|
+
when /Float/i
|
|
52
|
+
value.to_f
|
|
53
|
+
else
|
|
54
|
+
value
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
def valid?(value)
|
|
60
|
+
!value || allowable_values.include?(value)
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
65
|
+
def self.attribute_map
|
|
66
|
+
{
|
|
67
|
+
:'id' => :'id',
|
|
68
|
+
:'execution_id' => :'execution_id',
|
|
69
|
+
:'direction' => :'direction',
|
|
70
|
+
:'seq' => :'seq',
|
|
71
|
+
:'name' => :'name',
|
|
72
|
+
:'data' => :'data',
|
|
73
|
+
:'sender' => :'sender',
|
|
74
|
+
:'status' => :'status',
|
|
75
|
+
:'delivered_at' => :'delivered_at',
|
|
76
|
+
:'sent_at' => :'sent_at'
|
|
77
|
+
}
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Returns attribute mapping this model knows about
|
|
81
|
+
def self.acceptable_attribute_map
|
|
82
|
+
attribute_map
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Returns all the JSON keys this model knows about
|
|
86
|
+
def self.acceptable_attributes
|
|
87
|
+
acceptable_attribute_map.values
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# Attribute type mapping.
|
|
91
|
+
def self.openapi_types
|
|
92
|
+
{
|
|
93
|
+
:'id' => :'String',
|
|
94
|
+
:'execution_id' => :'String',
|
|
95
|
+
:'direction' => :'DurableMessageDirection',
|
|
96
|
+
:'seq' => :'Integer',
|
|
97
|
+
:'name' => :'String',
|
|
98
|
+
:'data' => :'Object',
|
|
99
|
+
:'sender' => :'DurableMessageSender',
|
|
100
|
+
:'status' => :'DurableMessageStatus',
|
|
101
|
+
:'delivered_at' => :'Time',
|
|
102
|
+
:'sent_at' => :'Time'
|
|
103
|
+
}
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# List of attributes with nullable: true
|
|
107
|
+
def self.openapi_nullable
|
|
108
|
+
Set.new([
|
|
109
|
+
:'data',
|
|
110
|
+
:'delivered_at',
|
|
111
|
+
])
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# Initializes the object
|
|
115
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
116
|
+
def initialize(attributes = {})
|
|
117
|
+
if (!attributes.is_a?(Hash))
|
|
118
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::DurableMessage` initialize method"
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
122
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
123
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
124
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
125
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::DurableMessage`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
126
|
+
end
|
|
127
|
+
h[k.to_sym] = v
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
if attributes.key?(:'id')
|
|
131
|
+
self.id = attributes[:'id']
|
|
132
|
+
else
|
|
133
|
+
self.id = nil
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
if attributes.key?(:'execution_id')
|
|
137
|
+
self.execution_id = attributes[:'execution_id']
|
|
138
|
+
else
|
|
139
|
+
self.execution_id = nil
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
if attributes.key?(:'direction')
|
|
143
|
+
self.direction = attributes[:'direction']
|
|
144
|
+
else
|
|
145
|
+
self.direction = nil
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
if attributes.key?(:'seq')
|
|
149
|
+
self.seq = attributes[:'seq']
|
|
150
|
+
else
|
|
151
|
+
self.seq = nil
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
if attributes.key?(:'name')
|
|
155
|
+
self.name = attributes[:'name']
|
|
156
|
+
else
|
|
157
|
+
self.name = nil
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
if attributes.key?(:'data')
|
|
161
|
+
self.data = attributes[:'data']
|
|
162
|
+
else
|
|
163
|
+
self.data = nil
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
if attributes.key?(:'sender')
|
|
167
|
+
self.sender = attributes[:'sender']
|
|
168
|
+
else
|
|
169
|
+
self.sender = nil
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
if attributes.key?(:'status')
|
|
173
|
+
self.status = attributes[:'status']
|
|
174
|
+
else
|
|
175
|
+
self.status = nil
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
if attributes.key?(:'delivered_at')
|
|
179
|
+
self.delivered_at = attributes[:'delivered_at']
|
|
180
|
+
else
|
|
181
|
+
self.delivered_at = nil
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
if attributes.key?(:'sent_at')
|
|
185
|
+
self.sent_at = attributes[:'sent_at']
|
|
186
|
+
else
|
|
187
|
+
self.sent_at = nil
|
|
188
|
+
end
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
192
|
+
# @return Array for valid properties with the reasons
|
|
193
|
+
def list_invalid_properties
|
|
194
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
195
|
+
invalid_properties = Array.new
|
|
196
|
+
if @id.nil?
|
|
197
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
if @execution_id.nil?
|
|
201
|
+
invalid_properties.push('invalid value for "execution_id", execution_id cannot be nil.')
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
if @direction.nil?
|
|
205
|
+
invalid_properties.push('invalid value for "direction", direction cannot be nil.')
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
if @seq.nil?
|
|
209
|
+
invalid_properties.push('invalid value for "seq", seq cannot be nil.')
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
if @name.nil?
|
|
213
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
if @sender.nil?
|
|
217
|
+
invalid_properties.push('invalid value for "sender", sender cannot be nil.')
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
if @status.nil?
|
|
221
|
+
invalid_properties.push('invalid value for "status", status cannot be nil.')
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
if @sent_at.nil?
|
|
225
|
+
invalid_properties.push('invalid value for "sent_at", sent_at cannot be nil.')
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
invalid_properties
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
# Check to see if the all the properties in the model are valid
|
|
232
|
+
# @return true if the model is valid
|
|
233
|
+
def valid?
|
|
234
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
235
|
+
return false if @id.nil?
|
|
236
|
+
return false if @execution_id.nil?
|
|
237
|
+
return false if @direction.nil?
|
|
238
|
+
return false if @seq.nil?
|
|
239
|
+
return false if @name.nil?
|
|
240
|
+
return false if @sender.nil?
|
|
241
|
+
return false if @status.nil?
|
|
242
|
+
return false if @sent_at.nil?
|
|
243
|
+
true
|
|
244
|
+
end
|
|
245
|
+
|
|
246
|
+
# Custom attribute writer method with validation
|
|
247
|
+
# @param [Object] id Value to be assigned
|
|
248
|
+
def id=(id)
|
|
249
|
+
if id.nil?
|
|
250
|
+
fail ArgumentError, 'id cannot be nil'
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
@id = id
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
# Custom attribute writer method with validation
|
|
257
|
+
# @param [Object] execution_id Value to be assigned
|
|
258
|
+
def execution_id=(execution_id)
|
|
259
|
+
if execution_id.nil?
|
|
260
|
+
fail ArgumentError, 'execution_id cannot be nil'
|
|
261
|
+
end
|
|
262
|
+
|
|
263
|
+
@execution_id = execution_id
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
# Custom attribute writer method with validation
|
|
267
|
+
# @param [Object] direction Value to be assigned
|
|
268
|
+
def direction=(direction)
|
|
269
|
+
if direction.nil?
|
|
270
|
+
fail ArgumentError, 'direction cannot be nil'
|
|
271
|
+
end
|
|
272
|
+
|
|
273
|
+
@direction = direction
|
|
274
|
+
end
|
|
275
|
+
|
|
276
|
+
# Custom attribute writer method with validation
|
|
277
|
+
# @param [Object] seq Value to be assigned
|
|
278
|
+
def seq=(seq)
|
|
279
|
+
if seq.nil?
|
|
280
|
+
fail ArgumentError, 'seq cannot be nil'
|
|
281
|
+
end
|
|
282
|
+
|
|
283
|
+
@seq = seq
|
|
284
|
+
end
|
|
285
|
+
|
|
286
|
+
# Custom attribute writer method with validation
|
|
287
|
+
# @param [Object] name Value to be assigned
|
|
288
|
+
def name=(name)
|
|
289
|
+
if name.nil?
|
|
290
|
+
fail ArgumentError, 'name cannot be nil'
|
|
291
|
+
end
|
|
292
|
+
|
|
293
|
+
@name = name
|
|
294
|
+
end
|
|
295
|
+
|
|
296
|
+
# Custom attribute writer method with validation
|
|
297
|
+
# @param [Object] sender Value to be assigned
|
|
298
|
+
def sender=(sender)
|
|
299
|
+
if sender.nil?
|
|
300
|
+
fail ArgumentError, 'sender cannot be nil'
|
|
301
|
+
end
|
|
302
|
+
|
|
303
|
+
@sender = sender
|
|
304
|
+
end
|
|
305
|
+
|
|
306
|
+
# Custom attribute writer method with validation
|
|
307
|
+
# @param [Object] status Value to be assigned
|
|
308
|
+
def status=(status)
|
|
309
|
+
if status.nil?
|
|
310
|
+
fail ArgumentError, 'status cannot be nil'
|
|
311
|
+
end
|
|
312
|
+
|
|
313
|
+
@status = status
|
|
314
|
+
end
|
|
315
|
+
|
|
316
|
+
# Custom attribute writer method with validation
|
|
317
|
+
# @param [Object] sent_at Value to be assigned
|
|
318
|
+
def sent_at=(sent_at)
|
|
319
|
+
if sent_at.nil?
|
|
320
|
+
fail ArgumentError, 'sent_at cannot be nil'
|
|
321
|
+
end
|
|
322
|
+
|
|
323
|
+
@sent_at = sent_at
|
|
324
|
+
end
|
|
325
|
+
|
|
326
|
+
# Checks equality by comparing each attribute.
|
|
327
|
+
# @param [Object] Object to be compared
|
|
328
|
+
def ==(o)
|
|
329
|
+
return true if self.equal?(o)
|
|
330
|
+
self.class == o.class &&
|
|
331
|
+
id == o.id &&
|
|
332
|
+
execution_id == o.execution_id &&
|
|
333
|
+
direction == o.direction &&
|
|
334
|
+
seq == o.seq &&
|
|
335
|
+
name == o.name &&
|
|
336
|
+
data == o.data &&
|
|
337
|
+
sender == o.sender &&
|
|
338
|
+
status == o.status &&
|
|
339
|
+
delivered_at == o.delivered_at &&
|
|
340
|
+
sent_at == o.sent_at
|
|
341
|
+
end
|
|
342
|
+
|
|
343
|
+
# @see the `==` method
|
|
344
|
+
# @param [Object] Object to be compared
|
|
345
|
+
def eql?(o)
|
|
346
|
+
self == o
|
|
347
|
+
end
|
|
348
|
+
|
|
349
|
+
# Calculates hash code according to all attributes.
|
|
350
|
+
# @return [Integer] Hash code
|
|
351
|
+
def hash
|
|
352
|
+
[id, execution_id, direction, seq, name, data, sender, status, delivered_at, sent_at].hash
|
|
353
|
+
end
|
|
354
|
+
|
|
355
|
+
# Builds the object from hash
|
|
356
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
357
|
+
# @return [Object] Returns the model itself
|
|
358
|
+
def self.build_from_hash(attributes)
|
|
359
|
+
return nil unless attributes.is_a?(Hash)
|
|
360
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
361
|
+
transformed_hash = {}
|
|
362
|
+
openapi_types.each_pair do |key, type|
|
|
363
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
364
|
+
transformed_hash["#{key}"] = nil
|
|
365
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
366
|
+
# check to ensure the input is an array given that the attribute
|
|
367
|
+
# is documented as an array but the input is not
|
|
368
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
369
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
370
|
+
end
|
|
371
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
372
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
373
|
+
end
|
|
374
|
+
end
|
|
375
|
+
new(transformed_hash)
|
|
376
|
+
end
|
|
377
|
+
|
|
378
|
+
# Returns the object in the form of hash
|
|
379
|
+
# @return [Hash] Returns the object in the form of hash
|
|
380
|
+
def to_hash
|
|
381
|
+
hash = {}
|
|
382
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
383
|
+
value = self.send(attr)
|
|
384
|
+
if value.nil?
|
|
385
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
386
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
387
|
+
end
|
|
388
|
+
|
|
389
|
+
hash[param] = _to_hash(value)
|
|
390
|
+
end
|
|
391
|
+
hash
|
|
392
|
+
end
|
|
393
|
+
|
|
394
|
+
end
|
|
395
|
+
|
|
396
|
+
end
|
|
@@ -0,0 +1,40 @@
|
|
|
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 DurableMessageDirection
|
|
18
|
+
IN = "in".freeze
|
|
19
|
+
OUT = "out".freeze
|
|
20
|
+
|
|
21
|
+
def self.all_vars
|
|
22
|
+
@all_vars ||= [IN, OUT].freeze
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
# Builds the enum from string
|
|
26
|
+
# @param [String] The enum value in the form of the string
|
|
27
|
+
# @return [String] The enum value
|
|
28
|
+
def self.build_from_hash(value)
|
|
29
|
+
new.build_from_hash(value)
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Builds the enum from string
|
|
33
|
+
# @param [String] The enum value in the form of the string
|
|
34
|
+
# @return [String] The enum value
|
|
35
|
+
def build_from_hash(value)
|
|
36
|
+
return value if DurableMessageDirection.all_vars.include?(value)
|
|
37
|
+
raise "Invalid ENUM value #{value} for class #DurableMessageDirection"
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|