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
|
@@ -57,6 +57,9 @@ module Volcano::Generated
|
|
|
57
57
|
# Paths on this frontend that forward to a public function, ordered from most to least specific. Anyone who can load the frontend can reach the target function at these paths without a credential.
|
|
58
58
|
attr_accessor :function_routes
|
|
59
59
|
|
|
60
|
+
# Recorded completion time of the most recent deploy or redeploy with status active. Omitted when no such deployment has a recorded completion time. Site traffic, pending deployments, degraded deployments, failed deployments, and deletion do not change this value.
|
|
61
|
+
attr_accessor :last_deployed_at
|
|
62
|
+
|
|
60
63
|
attr_accessor :last_invoked_at
|
|
61
64
|
|
|
62
65
|
attr_accessor :created_at
|
|
@@ -104,6 +107,7 @@ module Volcano::Generated
|
|
|
104
107
|
:'custom_domain' => :'custom_domain',
|
|
105
108
|
:'custom_domain_status' => :'custom_domain_status',
|
|
106
109
|
:'function_routes' => :'function_routes',
|
|
110
|
+
:'last_deployed_at' => :'last_deployed_at',
|
|
107
111
|
:'last_invoked_at' => :'last_invoked_at',
|
|
108
112
|
:'created_at' => :'created_at',
|
|
109
113
|
:'updated_at' => :'updated_at'
|
|
@@ -139,6 +143,7 @@ module Volcano::Generated
|
|
|
139
143
|
:'custom_domain' => :'String',
|
|
140
144
|
:'custom_domain_status' => :'String',
|
|
141
145
|
:'function_routes' => :'Array<FrontendFunctionRoute>',
|
|
146
|
+
:'last_deployed_at' => :'Time',
|
|
142
147
|
:'last_invoked_at' => :'Time',
|
|
143
148
|
:'created_at' => :'Time',
|
|
144
149
|
:'updated_at' => :'Time'
|
|
@@ -251,6 +256,10 @@ module Volcano::Generated
|
|
|
251
256
|
self.function_routes = nil
|
|
252
257
|
end
|
|
253
258
|
|
|
259
|
+
if attributes.key?(:'last_deployed_at')
|
|
260
|
+
self.last_deployed_at = attributes[:'last_deployed_at']
|
|
261
|
+
end
|
|
262
|
+
|
|
254
263
|
if attributes.key?(:'last_invoked_at')
|
|
255
264
|
self.last_invoked_at = attributes[:'last_invoked_at']
|
|
256
265
|
end
|
|
@@ -525,6 +534,7 @@ module Volcano::Generated
|
|
|
525
534
|
custom_domain == o.custom_domain &&
|
|
526
535
|
custom_domain_status == o.custom_domain_status &&
|
|
527
536
|
function_routes == o.function_routes &&
|
|
537
|
+
last_deployed_at == o.last_deployed_at &&
|
|
528
538
|
last_invoked_at == o.last_invoked_at &&
|
|
529
539
|
created_at == o.created_at &&
|
|
530
540
|
updated_at == o.updated_at
|
|
@@ -539,7 +549,7 @@ module Volcano::Generated
|
|
|
539
549
|
# Calculates hash code according to all attributes.
|
|
540
550
|
# @return [Integer] Hash code
|
|
541
551
|
def hash
|
|
542
|
-
[variable_scope, declared_variables, id, project_id, name, framework, app_root, status, provisioning_started_at, deployed_regions, current_deployment_id, pending_deployment_id, site_url, custom_domain, custom_domain_status, function_routes, last_invoked_at, created_at, updated_at].hash
|
|
552
|
+
[variable_scope, declared_variables, id, project_id, name, framework, app_root, status, provisioning_started_at, deployed_regions, current_deployment_id, pending_deployment_id, site_url, custom_domain, custom_domain_status, function_routes, last_deployed_at, last_invoked_at, created_at, updated_at].hash
|
|
543
553
|
end
|
|
544
554
|
|
|
545
555
|
# Builds the object from hash
|
data/lib/volcano/generated/lib/volcano-generated/models/frontend_custom_domain_conflict_error.rb
CHANGED
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Volcano::Generated
|
|
17
|
-
# Domain ownership conflict. With `code: ownership_verification_required`, the account has not proven it owns the domain: publish `required_record` in DNS and send the same request again. The retry succeeds once Volcano can see the record. Other conflicts omit both fields.
|
|
17
|
+
# Domain ownership conflict. With `code: ownership_verification_required`, the account has not proven it owns the domain: publish `required_record` in DNS and send the same request again. The retry succeeds once Volcano can see the record. With `code: custom_domain_releasing`, a removed domain still holds the hostname or the frontend while Volcano releases it: send the same request again after the response's `Retry-After` seconds. A release that will not finish within a few minutes is a plain conflict. Other conflicts omit both fields.
|
|
18
18
|
class FrontendCustomDomainConflictError < ApiModelBase
|
|
19
19
|
attr_accessor :error
|
|
20
20
|
|
|
@@ -24,9 +24,13 @@ module Volcano::Generated
|
|
|
24
24
|
# `verified`: the domain is served by a validated certificate. `pending`: it is not served yet, is being re-validated after its certificate material was withdrawn, or Volcano is retrying after a failure. `failed`: a failure left the domain unserved, alongside `domain_status: failed`; managed domains report the cause in `failure_reason`.
|
|
25
25
|
attr_accessor :verification_status
|
|
26
26
|
|
|
27
|
-
#
|
|
27
|
+
# Certificate the domain serves, present only while it is active. `uploaded`: the BYOC certificate, including after the domain switched to managed TLS and until Volcano issues the managed one; `failure_reason` then reports an issuance failure. `managed`: a certificate Volcano issued.
|
|
28
|
+
attr_accessor :serving_certificate
|
|
29
|
+
|
|
30
|
+
# Failure category, present when managed TLS setup has failed, or when issuance is failing for a domain that switched to managed TLS and still serves its uploaded certificate. Current values are provider, certificate, ownership, and internal; ownership means another account has already claimed the hostname through ownership verification. Treat unrecognized values as internal.
|
|
28
31
|
attr_accessor :failure_reason
|
|
29
32
|
|
|
33
|
+
# DNS records to publish now. For a managed domain whose hostname the account already owns, the create response names the `_acme-challenge` CNAME that authorizes certificate issuance and renewal. Otherwise it names the `_volcano` TXT record that proves ownership of the hostname's registrable domain, and reads return the CNAME once Volcano sees that record. Usually empty for BYOC.
|
|
30
34
|
attr_accessor :verification_records
|
|
31
35
|
|
|
32
36
|
# Deprecated and no longer returned. Use routing_target_hostname as the DNS routing target.
|
|
@@ -70,6 +74,7 @@ module Volcano::Generated
|
|
|
70
74
|
:'tls_mode' => :'tls_mode',
|
|
71
75
|
:'domain_status' => :'domain_status',
|
|
72
76
|
:'verification_status' => :'verification_status',
|
|
77
|
+
:'serving_certificate' => :'serving_certificate',
|
|
73
78
|
:'failure_reason' => :'failure_reason',
|
|
74
79
|
:'verification_records' => :'verification_records',
|
|
75
80
|
:'required_routing_record' => :'required_routing_record',
|
|
@@ -97,6 +102,7 @@ module Volcano::Generated
|
|
|
97
102
|
:'tls_mode' => :'String',
|
|
98
103
|
:'domain_status' => :'String',
|
|
99
104
|
:'verification_status' => :'String',
|
|
105
|
+
:'serving_certificate' => :'String',
|
|
100
106
|
:'failure_reason' => :'String',
|
|
101
107
|
:'verification_records' => :'Array<FrontendDomainVerificationRecord>',
|
|
102
108
|
:'required_routing_record' => :'FrontendDomainRoutingRecord',
|
|
@@ -153,6 +159,10 @@ module Volcano::Generated
|
|
|
153
159
|
self.verification_status = nil
|
|
154
160
|
end
|
|
155
161
|
|
|
162
|
+
if attributes.key?(:'serving_certificate')
|
|
163
|
+
self.serving_certificate = attributes[:'serving_certificate']
|
|
164
|
+
end
|
|
165
|
+
|
|
156
166
|
if attributes.key?(:'failure_reason')
|
|
157
167
|
self.failure_reason = attributes[:'failure_reason']
|
|
158
168
|
end
|
|
@@ -242,6 +252,8 @@ module Volcano::Generated
|
|
|
242
252
|
return false if @verification_status.nil?
|
|
243
253
|
verification_status_validator = EnumAttributeValidator.new('String', ["pending", "verified", "failed"])
|
|
244
254
|
return false unless verification_status_validator.valid?(@verification_status)
|
|
255
|
+
serving_certificate_validator = EnumAttributeValidator.new('String', ["uploaded", "managed"])
|
|
256
|
+
return false unless serving_certificate_validator.valid?(@serving_certificate)
|
|
245
257
|
return false if @effective_urls.nil?
|
|
246
258
|
return false if @created_at.nil?
|
|
247
259
|
return false if @updated_at.nil?
|
|
@@ -288,6 +300,16 @@ module Volcano::Generated
|
|
|
288
300
|
@verification_status = verification_status
|
|
289
301
|
end
|
|
290
302
|
|
|
303
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
304
|
+
# @param [Object] serving_certificate Object to be assigned
|
|
305
|
+
def serving_certificate=(serving_certificate)
|
|
306
|
+
validator = EnumAttributeValidator.new('String', ["uploaded", "managed"])
|
|
307
|
+
unless validator.valid?(serving_certificate)
|
|
308
|
+
fail ArgumentError, "invalid value for \"serving_certificate\", must be one of #{validator.allowable_values}."
|
|
309
|
+
end
|
|
310
|
+
@serving_certificate = serving_certificate
|
|
311
|
+
end
|
|
312
|
+
|
|
291
313
|
# Custom attribute writer method with validation
|
|
292
314
|
# @param [Object] effective_urls Value to be assigned
|
|
293
315
|
def effective_urls=(effective_urls)
|
|
@@ -327,6 +349,7 @@ module Volcano::Generated
|
|
|
327
349
|
tls_mode == o.tls_mode &&
|
|
328
350
|
domain_status == o.domain_status &&
|
|
329
351
|
verification_status == o.verification_status &&
|
|
352
|
+
serving_certificate == o.serving_certificate &&
|
|
330
353
|
failure_reason == o.failure_reason &&
|
|
331
354
|
verification_records == o.verification_records &&
|
|
332
355
|
required_routing_record == o.required_routing_record &&
|
|
@@ -345,7 +368,7 @@ module Volcano::Generated
|
|
|
345
368
|
# Calculates hash code according to all attributes.
|
|
346
369
|
# @return [Integer] Hash code
|
|
347
370
|
def hash
|
|
348
|
-
[domain, tls_mode, domain_status, verification_status, failure_reason, verification_records, required_routing_record, routing_target_hostname, effective_urls, created_at, updated_at].hash
|
|
371
|
+
[domain, tls_mode, domain_status, verification_status, serving_certificate, failure_reason, verification_records, required_routing_record, routing_target_hostname, effective_urls, created_at, updated_at].hash
|
|
349
372
|
end
|
|
350
373
|
|
|
351
374
|
# Builds the object from hash
|
|
@@ -0,0 +1,493 @@
|
|
|
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
|
+
# Runtime errors from one function or frontend, grouped by error type and stack.
|
|
18
|
+
class Issue < ApiModelBase
|
|
19
|
+
attr_accessor :id
|
|
20
|
+
|
|
21
|
+
attr_accessor :project_id
|
|
22
|
+
|
|
23
|
+
attr_accessor :resource
|
|
24
|
+
|
|
25
|
+
# The error type and message, with values such as IDs, numbers, and URLs replaced by placeholders like `<uuid>` and `<n>`.
|
|
26
|
+
attr_accessor :title
|
|
27
|
+
|
|
28
|
+
# The exception class, such as `TypeError`. Omitted when the error has none.
|
|
29
|
+
attr_accessor :error_type
|
|
30
|
+
|
|
31
|
+
# The innermost frame of your code in the stack, as `function (file)`. Omitted without a stack.
|
|
32
|
+
attr_accessor :culprit
|
|
33
|
+
|
|
34
|
+
attr_accessor :status
|
|
35
|
+
|
|
36
|
+
# Errors counted in this issue. A retried delivery can count an error twice.
|
|
37
|
+
attr_accessor :event_count
|
|
38
|
+
|
|
39
|
+
attr_accessor :first_seen_at
|
|
40
|
+
|
|
41
|
+
attr_accessor :last_seen_at
|
|
42
|
+
|
|
43
|
+
# The region that served the latest error, such as `us-east-1`.
|
|
44
|
+
attr_accessor :last_region
|
|
45
|
+
|
|
46
|
+
# The ID of the latest error's log event, while logs retain it.
|
|
47
|
+
attr_accessor :sample_event_id
|
|
48
|
+
|
|
49
|
+
# When the latest error's log event was written.
|
|
50
|
+
attr_accessor :sample_event_at
|
|
51
|
+
|
|
52
|
+
# When the issue was resolved. Present only while it is resolved.
|
|
53
|
+
attr_accessor :resolved_at
|
|
54
|
+
|
|
55
|
+
# When a resolved issue was last seen again and reopened.
|
|
56
|
+
attr_accessor :regressed_at
|
|
57
|
+
|
|
58
|
+
attr_accessor :created_at
|
|
59
|
+
|
|
60
|
+
attr_accessor :updated_at
|
|
61
|
+
|
|
62
|
+
class EnumAttributeValidator
|
|
63
|
+
attr_reader :datatype
|
|
64
|
+
attr_reader :allowable_values
|
|
65
|
+
|
|
66
|
+
def initialize(datatype, allowable_values)
|
|
67
|
+
@allowable_values = allowable_values.map do |value|
|
|
68
|
+
case datatype.to_s
|
|
69
|
+
when /Integer/i
|
|
70
|
+
value.to_i
|
|
71
|
+
when /Float/i
|
|
72
|
+
value.to_f
|
|
73
|
+
else
|
|
74
|
+
value
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
def valid?(value)
|
|
80
|
+
!value || allowable_values.include?(value)
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
85
|
+
def self.attribute_map
|
|
86
|
+
{
|
|
87
|
+
:'id' => :'id',
|
|
88
|
+
:'project_id' => :'project_id',
|
|
89
|
+
:'resource' => :'resource',
|
|
90
|
+
:'title' => :'title',
|
|
91
|
+
:'error_type' => :'error_type',
|
|
92
|
+
:'culprit' => :'culprit',
|
|
93
|
+
:'status' => :'status',
|
|
94
|
+
:'event_count' => :'event_count',
|
|
95
|
+
:'first_seen_at' => :'first_seen_at',
|
|
96
|
+
:'last_seen_at' => :'last_seen_at',
|
|
97
|
+
:'last_region' => :'last_region',
|
|
98
|
+
:'sample_event_id' => :'sample_event_id',
|
|
99
|
+
:'sample_event_at' => :'sample_event_at',
|
|
100
|
+
:'resolved_at' => :'resolved_at',
|
|
101
|
+
:'regressed_at' => :'regressed_at',
|
|
102
|
+
:'created_at' => :'created_at',
|
|
103
|
+
:'updated_at' => :'updated_at'
|
|
104
|
+
}
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# Returns attribute mapping this model knows about
|
|
108
|
+
def self.acceptable_attribute_map
|
|
109
|
+
attribute_map
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# Returns all the JSON keys this model knows about
|
|
113
|
+
def self.acceptable_attributes
|
|
114
|
+
acceptable_attribute_map.values
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# Attribute type mapping.
|
|
118
|
+
def self.openapi_types
|
|
119
|
+
{
|
|
120
|
+
:'id' => :'String',
|
|
121
|
+
:'project_id' => :'String',
|
|
122
|
+
:'resource' => :'ResourceReference',
|
|
123
|
+
:'title' => :'String',
|
|
124
|
+
:'error_type' => :'String',
|
|
125
|
+
:'culprit' => :'String',
|
|
126
|
+
:'status' => :'IssueStatus',
|
|
127
|
+
:'event_count' => :'Integer',
|
|
128
|
+
:'first_seen_at' => :'Time',
|
|
129
|
+
:'last_seen_at' => :'Time',
|
|
130
|
+
:'last_region' => :'String',
|
|
131
|
+
:'sample_event_id' => :'String',
|
|
132
|
+
:'sample_event_at' => :'Time',
|
|
133
|
+
:'resolved_at' => :'Time',
|
|
134
|
+
:'regressed_at' => :'Time',
|
|
135
|
+
:'created_at' => :'Time',
|
|
136
|
+
:'updated_at' => :'Time'
|
|
137
|
+
}
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# List of attributes with nullable: true
|
|
141
|
+
def self.openapi_nullable
|
|
142
|
+
Set.new([
|
|
143
|
+
])
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# Initializes the object
|
|
147
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
148
|
+
def initialize(attributes = {})
|
|
149
|
+
if (!attributes.is_a?(Hash))
|
|
150
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::Issue` initialize method"
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
154
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
155
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
156
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
157
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::Issue`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
158
|
+
end
|
|
159
|
+
h[k.to_sym] = v
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
if attributes.key?(:'id')
|
|
163
|
+
self.id = attributes[:'id']
|
|
164
|
+
else
|
|
165
|
+
self.id = nil
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
if attributes.key?(:'project_id')
|
|
169
|
+
self.project_id = attributes[:'project_id']
|
|
170
|
+
else
|
|
171
|
+
self.project_id = nil
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
if attributes.key?(:'resource')
|
|
175
|
+
self.resource = attributes[:'resource']
|
|
176
|
+
else
|
|
177
|
+
self.resource = nil
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
if attributes.key?(:'title')
|
|
181
|
+
self.title = attributes[:'title']
|
|
182
|
+
else
|
|
183
|
+
self.title = nil
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
if attributes.key?(:'error_type')
|
|
187
|
+
self.error_type = attributes[:'error_type']
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
if attributes.key?(:'culprit')
|
|
191
|
+
self.culprit = attributes[:'culprit']
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
if attributes.key?(:'status')
|
|
195
|
+
self.status = attributes[:'status']
|
|
196
|
+
else
|
|
197
|
+
self.status = nil
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
if attributes.key?(:'event_count')
|
|
201
|
+
self.event_count = attributes[:'event_count']
|
|
202
|
+
else
|
|
203
|
+
self.event_count = nil
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
if attributes.key?(:'first_seen_at')
|
|
207
|
+
self.first_seen_at = attributes[:'first_seen_at']
|
|
208
|
+
else
|
|
209
|
+
self.first_seen_at = nil
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
if attributes.key?(:'last_seen_at')
|
|
213
|
+
self.last_seen_at = attributes[:'last_seen_at']
|
|
214
|
+
else
|
|
215
|
+
self.last_seen_at = nil
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
if attributes.key?(:'last_region')
|
|
219
|
+
self.last_region = attributes[:'last_region']
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
if attributes.key?(:'sample_event_id')
|
|
223
|
+
self.sample_event_id = attributes[:'sample_event_id']
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
if attributes.key?(:'sample_event_at')
|
|
227
|
+
self.sample_event_at = attributes[:'sample_event_at']
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
if attributes.key?(:'resolved_at')
|
|
231
|
+
self.resolved_at = attributes[:'resolved_at']
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
if attributes.key?(:'regressed_at')
|
|
235
|
+
self.regressed_at = attributes[:'regressed_at']
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
if attributes.key?(:'created_at')
|
|
239
|
+
self.created_at = attributes[:'created_at']
|
|
240
|
+
else
|
|
241
|
+
self.created_at = nil
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
if attributes.key?(:'updated_at')
|
|
245
|
+
self.updated_at = attributes[:'updated_at']
|
|
246
|
+
else
|
|
247
|
+
self.updated_at = nil
|
|
248
|
+
end
|
|
249
|
+
end
|
|
250
|
+
|
|
251
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
252
|
+
# @return Array for valid properties with the reasons
|
|
253
|
+
def list_invalid_properties
|
|
254
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
255
|
+
invalid_properties = Array.new
|
|
256
|
+
if @id.nil?
|
|
257
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
258
|
+
end
|
|
259
|
+
|
|
260
|
+
if @project_id.nil?
|
|
261
|
+
invalid_properties.push('invalid value for "project_id", project_id cannot be nil.')
|
|
262
|
+
end
|
|
263
|
+
|
|
264
|
+
if @resource.nil?
|
|
265
|
+
invalid_properties.push('invalid value for "resource", resource cannot be nil.')
|
|
266
|
+
end
|
|
267
|
+
|
|
268
|
+
if @title.nil?
|
|
269
|
+
invalid_properties.push('invalid value for "title", title cannot be nil.')
|
|
270
|
+
end
|
|
271
|
+
|
|
272
|
+
if @status.nil?
|
|
273
|
+
invalid_properties.push('invalid value for "status", status cannot be nil.')
|
|
274
|
+
end
|
|
275
|
+
|
|
276
|
+
if @event_count.nil?
|
|
277
|
+
invalid_properties.push('invalid value for "event_count", event_count cannot be nil.')
|
|
278
|
+
end
|
|
279
|
+
|
|
280
|
+
if @first_seen_at.nil?
|
|
281
|
+
invalid_properties.push('invalid value for "first_seen_at", first_seen_at cannot be nil.')
|
|
282
|
+
end
|
|
283
|
+
|
|
284
|
+
if @last_seen_at.nil?
|
|
285
|
+
invalid_properties.push('invalid value for "last_seen_at", last_seen_at cannot be nil.')
|
|
286
|
+
end
|
|
287
|
+
|
|
288
|
+
if @created_at.nil?
|
|
289
|
+
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
|
290
|
+
end
|
|
291
|
+
|
|
292
|
+
if @updated_at.nil?
|
|
293
|
+
invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
|
|
294
|
+
end
|
|
295
|
+
|
|
296
|
+
invalid_properties
|
|
297
|
+
end
|
|
298
|
+
|
|
299
|
+
# Check to see if the all the properties in the model are valid
|
|
300
|
+
# @return true if the model is valid
|
|
301
|
+
def valid?
|
|
302
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
303
|
+
return false if @id.nil?
|
|
304
|
+
return false if @project_id.nil?
|
|
305
|
+
return false if @resource.nil?
|
|
306
|
+
return false if @title.nil?
|
|
307
|
+
return false if @status.nil?
|
|
308
|
+
return false if @event_count.nil?
|
|
309
|
+
return false if @first_seen_at.nil?
|
|
310
|
+
return false if @last_seen_at.nil?
|
|
311
|
+
return false if @created_at.nil?
|
|
312
|
+
return false if @updated_at.nil?
|
|
313
|
+
true
|
|
314
|
+
end
|
|
315
|
+
|
|
316
|
+
# Custom attribute writer method with validation
|
|
317
|
+
# @param [Object] id Value to be assigned
|
|
318
|
+
def id=(id)
|
|
319
|
+
if id.nil?
|
|
320
|
+
fail ArgumentError, 'id cannot be nil'
|
|
321
|
+
end
|
|
322
|
+
|
|
323
|
+
@id = id
|
|
324
|
+
end
|
|
325
|
+
|
|
326
|
+
# Custom attribute writer method with validation
|
|
327
|
+
# @param [Object] project_id Value to be assigned
|
|
328
|
+
def project_id=(project_id)
|
|
329
|
+
if project_id.nil?
|
|
330
|
+
fail ArgumentError, 'project_id cannot be nil'
|
|
331
|
+
end
|
|
332
|
+
|
|
333
|
+
@project_id = project_id
|
|
334
|
+
end
|
|
335
|
+
|
|
336
|
+
# Custom attribute writer method with validation
|
|
337
|
+
# @param [Object] resource Value to be assigned
|
|
338
|
+
def resource=(resource)
|
|
339
|
+
if resource.nil?
|
|
340
|
+
fail ArgumentError, 'resource cannot be nil'
|
|
341
|
+
end
|
|
342
|
+
|
|
343
|
+
@resource = resource
|
|
344
|
+
end
|
|
345
|
+
|
|
346
|
+
# Custom attribute writer method with validation
|
|
347
|
+
# @param [Object] title Value to be assigned
|
|
348
|
+
def title=(title)
|
|
349
|
+
if title.nil?
|
|
350
|
+
fail ArgumentError, 'title cannot be nil'
|
|
351
|
+
end
|
|
352
|
+
|
|
353
|
+
@title = title
|
|
354
|
+
end
|
|
355
|
+
|
|
356
|
+
# Custom attribute writer method with validation
|
|
357
|
+
# @param [Object] status Value to be assigned
|
|
358
|
+
def status=(status)
|
|
359
|
+
if status.nil?
|
|
360
|
+
fail ArgumentError, 'status cannot be nil'
|
|
361
|
+
end
|
|
362
|
+
|
|
363
|
+
@status = status
|
|
364
|
+
end
|
|
365
|
+
|
|
366
|
+
# Custom attribute writer method with validation
|
|
367
|
+
# @param [Object] event_count Value to be assigned
|
|
368
|
+
def event_count=(event_count)
|
|
369
|
+
if event_count.nil?
|
|
370
|
+
fail ArgumentError, 'event_count cannot be nil'
|
|
371
|
+
end
|
|
372
|
+
|
|
373
|
+
@event_count = event_count
|
|
374
|
+
end
|
|
375
|
+
|
|
376
|
+
# Custom attribute writer method with validation
|
|
377
|
+
# @param [Object] first_seen_at Value to be assigned
|
|
378
|
+
def first_seen_at=(first_seen_at)
|
|
379
|
+
if first_seen_at.nil?
|
|
380
|
+
fail ArgumentError, 'first_seen_at cannot be nil'
|
|
381
|
+
end
|
|
382
|
+
|
|
383
|
+
@first_seen_at = first_seen_at
|
|
384
|
+
end
|
|
385
|
+
|
|
386
|
+
# Custom attribute writer method with validation
|
|
387
|
+
# @param [Object] last_seen_at Value to be assigned
|
|
388
|
+
def last_seen_at=(last_seen_at)
|
|
389
|
+
if last_seen_at.nil?
|
|
390
|
+
fail ArgumentError, 'last_seen_at cannot be nil'
|
|
391
|
+
end
|
|
392
|
+
|
|
393
|
+
@last_seen_at = last_seen_at
|
|
394
|
+
end
|
|
395
|
+
|
|
396
|
+
# Custom attribute writer method with validation
|
|
397
|
+
# @param [Object] created_at Value to be assigned
|
|
398
|
+
def created_at=(created_at)
|
|
399
|
+
if created_at.nil?
|
|
400
|
+
fail ArgumentError, 'created_at cannot be nil'
|
|
401
|
+
end
|
|
402
|
+
|
|
403
|
+
@created_at = created_at
|
|
404
|
+
end
|
|
405
|
+
|
|
406
|
+
# Custom attribute writer method with validation
|
|
407
|
+
# @param [Object] updated_at Value to be assigned
|
|
408
|
+
def updated_at=(updated_at)
|
|
409
|
+
if updated_at.nil?
|
|
410
|
+
fail ArgumentError, 'updated_at cannot be nil'
|
|
411
|
+
end
|
|
412
|
+
|
|
413
|
+
@updated_at = updated_at
|
|
414
|
+
end
|
|
415
|
+
|
|
416
|
+
# Checks equality by comparing each attribute.
|
|
417
|
+
# @param [Object] Object to be compared
|
|
418
|
+
def ==(o)
|
|
419
|
+
return true if self.equal?(o)
|
|
420
|
+
self.class == o.class &&
|
|
421
|
+
id == o.id &&
|
|
422
|
+
project_id == o.project_id &&
|
|
423
|
+
resource == o.resource &&
|
|
424
|
+
title == o.title &&
|
|
425
|
+
error_type == o.error_type &&
|
|
426
|
+
culprit == o.culprit &&
|
|
427
|
+
status == o.status &&
|
|
428
|
+
event_count == o.event_count &&
|
|
429
|
+
first_seen_at == o.first_seen_at &&
|
|
430
|
+
last_seen_at == o.last_seen_at &&
|
|
431
|
+
last_region == o.last_region &&
|
|
432
|
+
sample_event_id == o.sample_event_id &&
|
|
433
|
+
sample_event_at == o.sample_event_at &&
|
|
434
|
+
resolved_at == o.resolved_at &&
|
|
435
|
+
regressed_at == o.regressed_at &&
|
|
436
|
+
created_at == o.created_at &&
|
|
437
|
+
updated_at == o.updated_at
|
|
438
|
+
end
|
|
439
|
+
|
|
440
|
+
# @see the `==` method
|
|
441
|
+
# @param [Object] Object to be compared
|
|
442
|
+
def eql?(o)
|
|
443
|
+
self == o
|
|
444
|
+
end
|
|
445
|
+
|
|
446
|
+
# Calculates hash code according to all attributes.
|
|
447
|
+
# @return [Integer] Hash code
|
|
448
|
+
def hash
|
|
449
|
+
[id, project_id, resource, title, error_type, culprit, status, event_count, first_seen_at, last_seen_at, last_region, sample_event_id, sample_event_at, resolved_at, regressed_at, created_at, updated_at].hash
|
|
450
|
+
end
|
|
451
|
+
|
|
452
|
+
# Builds the object from hash
|
|
453
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
454
|
+
# @return [Object] Returns the model itself
|
|
455
|
+
def self.build_from_hash(attributes)
|
|
456
|
+
return nil unless attributes.is_a?(Hash)
|
|
457
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
458
|
+
transformed_hash = {}
|
|
459
|
+
openapi_types.each_pair do |key, type|
|
|
460
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
461
|
+
transformed_hash["#{key}"] = nil
|
|
462
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
463
|
+
# check to ensure the input is an array given that the attribute
|
|
464
|
+
# is documented as an array but the input is not
|
|
465
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
466
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
467
|
+
end
|
|
468
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
469
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
470
|
+
end
|
|
471
|
+
end
|
|
472
|
+
new(transformed_hash)
|
|
473
|
+
end
|
|
474
|
+
|
|
475
|
+
# Returns the object in the form of hash
|
|
476
|
+
# @return [Hash] Returns the object in the form of hash
|
|
477
|
+
def to_hash
|
|
478
|
+
hash = {}
|
|
479
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
480
|
+
value = self.send(attr)
|
|
481
|
+
if value.nil?
|
|
482
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
483
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
484
|
+
end
|
|
485
|
+
|
|
486
|
+
hash[param] = _to_hash(value)
|
|
487
|
+
end
|
|
488
|
+
hash
|
|
489
|
+
end
|
|
490
|
+
|
|
491
|
+
end
|
|
492
|
+
|
|
493
|
+
end
|
|
@@ -0,0 +1,41 @@
|
|
|
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 IssueStatus
|
|
18
|
+
OPEN = "open".freeze
|
|
19
|
+
RESOLVED = "resolved".freeze
|
|
20
|
+
IGNORED = "ignored".freeze
|
|
21
|
+
|
|
22
|
+
def self.all_vars
|
|
23
|
+
@all_vars ||= [OPEN, RESOLVED, IGNORED].freeze
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
# Builds the enum from string
|
|
27
|
+
# @param [String] The enum value in the form of the string
|
|
28
|
+
# @return [String] The enum value
|
|
29
|
+
def self.build_from_hash(value)
|
|
30
|
+
new.build_from_hash(value)
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Builds the enum from string
|
|
34
|
+
# @param [String] The enum value in the form of the string
|
|
35
|
+
# @return [String] The enum value
|
|
36
|
+
def build_from_hash(value)
|
|
37
|
+
return value if IssueStatus.all_vars.include?(value)
|
|
38
|
+
raise "Invalid ENUM value #{value} for class #IssueStatus"
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|