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.
Files changed (92) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +53 -4
  3. data/lib/volcano/client.rb +1 -1
  4. data/lib/volcano/durable.rb +9 -4
  5. data/lib/volcano/durable_approval_models.rb +1 -1
  6. data/lib/volcano/durable_message_arguments.rb +49 -0
  7. data/lib/volcano/durable_message_backlog.rb +38 -0
  8. data/lib/volcano/durable_message_catch_ups.rb +112 -0
  9. data/lib/volcano/durable_message_models.rb +62 -0
  10. data/lib/volcano/durable_message_responses.rb +107 -0
  11. data/lib/volcano/durable_message_session.rb +72 -0
  12. data/lib/volcano/durable_message_stream.rb +176 -0
  13. data/lib/volcano/durable_messages.rb +217 -0
  14. data/lib/volcano/durable_models.rb +32 -3
  15. data/lib/volcano/generated/lib/volcano-generated/api/auth_admin_api.rb +2 -2
  16. data/lib/volcano/generated/lib/volcano-generated/api/auth_configuration_api.rb +2 -2
  17. data/lib/volcano/generated/lib/volcano-generated/api/autofix_api.rb +222 -0
  18. data/lib/volcano/generated/lib/volcano-generated/api/durable_functions_api.rb +725 -0
  19. data/lib/volcano/generated/lib/volcano-generated/api/frontends_api.rb +2 -2
  20. data/lib/volcano/generated/lib/volcano-generated/api/issues_api.rb +254 -0
  21. data/lib/volcano/generated/lib/volcano-generated/api/sandboxes_api.rb +20 -20
  22. data/lib/volcano/generated/lib/volcano-generated/api/system_api.rb +57 -0
  23. data/lib/volcano/generated/lib/volcano-generated/api/variable_environments_api.rb +373 -0
  24. data/lib/volcano/generated/lib/volcano-generated/api/verified_domains_api.rb +2 -2
  25. data/lib/volcano/generated/lib/volcano-generated/models/auth_config.rb +46 -4
  26. data/lib/volcano/generated/lib/volcano-generated/models/auth_insights_series_point.rb +110 -2
  27. data/lib/volcano/generated/lib/volcano-generated/models/autofix_model.rb +45 -0
  28. data/lib/volcano/generated/lib/volcano-generated/models/autofix_provider.rb +40 -0
  29. data/lib/volcano/generated/lib/volcano-generated/models/autofix_settings.rb +385 -0
  30. data/lib/volcano/generated/lib/volcano-generated/models/autofix_stage.rb +40 -0
  31. data/lib/volcano/generated/lib/volcano-generated/models/capability.rb +214 -0
  32. data/lib/volcano/generated/lib/volcano-generated/models/capability_list.rb +166 -0
  33. data/lib/volcano/generated/lib/volcano-generated/models/capability_status.rb +40 -0
  34. data/lib/volcano/generated/lib/volcano-generated/models/create_sandbox_session_request.rb +16 -53
  35. data/lib/volcano/generated/lib/volcano-generated/models/create_variable_environment_request.rb +176 -0
  36. data/lib/volcano/generated/lib/volcano-generated/models/durable_execution.rb +14 -4
  37. data/lib/volcano/generated/lib/volcano-generated/models/durable_message.rb +396 -0
  38. data/lib/volcano/generated/lib/volcano-generated/models/durable_message_direction.rb +40 -0
  39. data/lib/volcano/generated/lib/volcano-generated/models/durable_message_list.rb +194 -0
  40. data/lib/volcano/generated/lib/volcano-generated/models/durable_message_sender.rb +203 -0
  41. data/lib/volcano/generated/lib/volcano-generated/models/durable_message_session_registration.rb +165 -0
  42. data/lib/volcano/generated/lib/volcano-generated/models/durable_message_status.rb +43 -0
  43. data/lib/volcano/generated/lib/volcano-generated/models/durable_message_wait.rb +278 -0
  44. data/lib/volcano/generated/lib/volcano-generated/models/durable_message_wait_list.rb +167 -0
  45. data/lib/volcano/generated/lib/volcano-generated/models/durable_message_wait_registration.rb +225 -0
  46. data/lib/volcano/generated/lib/volcano-generated/models/durable_message_wait_status.rb +43 -0
  47. data/lib/volcano/generated/lib/volcano-generated/models/frontend.rb +11 -1
  48. data/lib/volcano/generated/lib/volcano-generated/models/frontend_custom_domain_conflict_error.rb +1 -1
  49. data/lib/volcano/generated/lib/volcano-generated/models/frontend_custom_domain_response.rb +25 -2
  50. data/lib/volcano/generated/lib/volcano-generated/models/issue.rb +493 -0
  51. data/lib/volcano/generated/lib/volcano-generated/models/issue_status.rb +41 -0
  52. data/lib/volcano/generated/lib/volcano-generated/models/metric_usage_data.rb +1 -1
  53. data/lib/volcano/generated/lib/volcano-generated/models/open_durable_message_session_request.rb +228 -0
  54. data/lib/volcano/generated/lib/volcano-generated/models/paginated_issues.rb +230 -0
  55. data/lib/volcano/generated/lib/volcano-generated/models/project_config.rb +10 -1
  56. data/lib/volcano/generated/lib/volcano-generated/models/project_config_autofix.rb +206 -0
  57. data/lib/volcano/generated/lib/volcano-generated/models/project_config_custom_domain.rb +1 -1
  58. data/lib/volcano/generated/lib/volcano-generated/models/project_config_sandbox.rb +12 -50
  59. data/lib/volcano/generated/lib/volcano-generated/models/project_frontend_custom_domain.rb +25 -2
  60. data/lib/volcano/generated/lib/volcano-generated/models/publish_durable_message_request.rb +205 -0
  61. data/lib/volcano/generated/lib/volcano-generated/models/register_durable_message_wait_request.rb +284 -0
  62. data/lib/volcano/generated/lib/volcano-generated/models/rename_variable_environment_request.rb +176 -0
  63. data/lib/volcano/generated/lib/volcano-generated/models/request_durable_approval_request.rb +1 -1
  64. data/lib/volcano/generated/lib/volcano-generated/models/sandbox_command_request.rb +11 -12
  65. data/lib/volcano/generated/lib/volcano-generated/models/sandbox_execution_request.rb +51 -13
  66. data/lib/volcano/generated/lib/volcano-generated/models/sandbox_session.rb +4 -30
  67. data/lib/volcano/generated/lib/volcano-generated/models/send_durable_message_request.rb +205 -0
  68. data/lib/volcano/generated/lib/volcano-generated/models/update_auth_config_request.rb +79 -1
  69. data/lib/volcano/generated/lib/volcano-generated/models/update_autofix_settings_request.rb +273 -0
  70. data/lib/volcano/generated/lib/volcano-generated/models/update_issue_request.rb +186 -0
  71. data/lib/volcano/generated/lib/volcano-generated/models/variable_environment.rb +325 -0
  72. data/lib/volcano/generated/lib/volcano-generated/models/variable_environment_list.rb +175 -0
  73. data/lib/volcano/generated/lib/volcano-generated.rb +34 -0
  74. data/lib/volcano/generated_transport.rb +1 -0
  75. data/lib/volcano/generated_transport_durable_messages.rb +57 -0
  76. data/lib/volcano/realtime/channel_callbacks.rb +5 -1
  77. data/lib/volcano/realtime/channel_lifecycle.rb +4 -1
  78. data/lib/volcano/realtime/durable_channel.rb +47 -0
  79. data/lib/volcano/realtime/lifecycle.rb +37 -1
  80. data/lib/volcano/realtime/protocol.rb +7 -3
  81. data/lib/volcano/realtime/protocol_dispatch.rb +1 -1
  82. data/lib/volcano/realtime/protocol_io.rb +7 -4
  83. data/lib/volcano/realtime/protocol_lifecycle.rb +7 -0
  84. data/lib/volcano/realtime/protocol_recovery.rb +23 -12
  85. data/lib/volcano/realtime.rb +42 -8
  86. data/lib/volcano/redaction.rb +1 -1
  87. data/lib/volcano/version.rb +1 -1
  88. data/lib/volcano.rb +8 -0
  89. data/sig/core_facades.rbs +15 -0
  90. data/sig/durable_message_records.rbs +68 -0
  91. data/sig/durable_records.rbs +17 -9
  92. metadata +46 -1
@@ -23,10 +23,19 @@ module Volcano::Generated
23
23
  # Successful session creations during the bucket.
24
24
  attr_accessor :signins
25
25
 
26
+ # Users registered in this bucket who are currently banned. Excludes deleted users, lifted bans, expired temporary bans, and internal test identities.
27
+ attr_accessor :banned_users
28
+
29
+ # Users registered in this bucket who are now deleted, counted once across soft and hard deletion. Grouped by signup date, not deletion date.
30
+ attr_accessor :deleted_users
31
+
32
+ # Currently available users registered in this bucket (signups minus banned_users minus deleted_users). Unban or expiry restores availability in the original signup bucket. This measures account availability, not return activity.
33
+ attr_accessor :available_users
34
+
26
35
  # Accounts deleted during this bucket, counted once across soft and hard deletion.
27
36
  attr_accessor :deletions
28
37
 
29
- # Registrations minus deletions during this bucket. May be negative.
38
+ # Registrations minus deletions during this bucket. May be negative. Bans do not affect this value.
30
39
  attr_accessor :net_growth
31
40
 
32
41
  # Whether the requested window or observation time clips this bucket.
@@ -38,6 +47,9 @@ module Volcano::Generated
38
47
  :'bucket_start' => :'bucket_start',
39
48
  :'signups' => :'signups',
40
49
  :'signins' => :'signins',
50
+ :'banned_users' => :'banned_users',
51
+ :'deleted_users' => :'deleted_users',
52
+ :'available_users' => :'available_users',
41
53
  :'deletions' => :'deletions',
42
54
  :'net_growth' => :'net_growth',
43
55
  :'is_partial' => :'is_partial'
@@ -60,6 +72,9 @@ module Volcano::Generated
60
72
  :'bucket_start' => :'Date',
61
73
  :'signups' => :'Integer',
62
74
  :'signins' => :'Integer',
75
+ :'banned_users' => :'Integer',
76
+ :'deleted_users' => :'Integer',
77
+ :'available_users' => :'Integer',
63
78
  :'deletions' => :'Integer',
64
79
  :'net_growth' => :'Integer',
65
80
  :'is_partial' => :'Boolean'
@@ -106,6 +121,24 @@ module Volcano::Generated
106
121
  self.signins = nil
107
122
  end
108
123
 
124
+ if attributes.key?(:'banned_users')
125
+ self.banned_users = attributes[:'banned_users']
126
+ else
127
+ self.banned_users = nil
128
+ end
129
+
130
+ if attributes.key?(:'deleted_users')
131
+ self.deleted_users = attributes[:'deleted_users']
132
+ else
133
+ self.deleted_users = nil
134
+ end
135
+
136
+ if attributes.key?(:'available_users')
137
+ self.available_users = attributes[:'available_users']
138
+ else
139
+ self.available_users = nil
140
+ end
141
+
109
142
  if attributes.key?(:'deletions')
110
143
  self.deletions = attributes[:'deletions']
111
144
  else
@@ -150,6 +183,30 @@ module Volcano::Generated
150
183
  invalid_properties.push('invalid value for "signins", must be greater than or equal to 0.')
151
184
  end
152
185
 
186
+ if @banned_users.nil?
187
+ invalid_properties.push('invalid value for "banned_users", banned_users cannot be nil.')
188
+ end
189
+
190
+ if @banned_users < 0
191
+ invalid_properties.push('invalid value for "banned_users", must be greater than or equal to 0.')
192
+ end
193
+
194
+ if @deleted_users.nil?
195
+ invalid_properties.push('invalid value for "deleted_users", deleted_users cannot be nil.')
196
+ end
197
+
198
+ if @deleted_users < 0
199
+ invalid_properties.push('invalid value for "deleted_users", must be greater than or equal to 0.')
200
+ end
201
+
202
+ if @available_users.nil?
203
+ invalid_properties.push('invalid value for "available_users", available_users cannot be nil.')
204
+ end
205
+
206
+ if @available_users < 0
207
+ invalid_properties.push('invalid value for "available_users", must be greater than or equal to 0.')
208
+ end
209
+
153
210
  if @deletions.nil?
154
211
  invalid_properties.push('invalid value for "deletions", deletions cannot be nil.')
155
212
  end
@@ -178,6 +235,12 @@ module Volcano::Generated
178
235
  return false if @signups < 0
179
236
  return false if @signins.nil?
180
237
  return false if @signins < 0
238
+ return false if @banned_users.nil?
239
+ return false if @banned_users < 0
240
+ return false if @deleted_users.nil?
241
+ return false if @deleted_users < 0
242
+ return false if @available_users.nil?
243
+ return false if @available_users < 0
181
244
  return false if @deletions.nil?
182
245
  return false if @deletions < 0
183
246
  return false if @net_growth.nil?
@@ -223,6 +286,48 @@ module Volcano::Generated
223
286
  @signins = signins
224
287
  end
225
288
 
289
+ # Custom attribute writer method with validation
290
+ # @param [Object] banned_users Value to be assigned
291
+ def banned_users=(banned_users)
292
+ if banned_users.nil?
293
+ fail ArgumentError, 'banned_users cannot be nil'
294
+ end
295
+
296
+ if banned_users < 0
297
+ fail ArgumentError, 'invalid value for "banned_users", must be greater than or equal to 0.'
298
+ end
299
+
300
+ @banned_users = banned_users
301
+ end
302
+
303
+ # Custom attribute writer method with validation
304
+ # @param [Object] deleted_users Value to be assigned
305
+ def deleted_users=(deleted_users)
306
+ if deleted_users.nil?
307
+ fail ArgumentError, 'deleted_users cannot be nil'
308
+ end
309
+
310
+ if deleted_users < 0
311
+ fail ArgumentError, 'invalid value for "deleted_users", must be greater than or equal to 0.'
312
+ end
313
+
314
+ @deleted_users = deleted_users
315
+ end
316
+
317
+ # Custom attribute writer method with validation
318
+ # @param [Object] available_users Value to be assigned
319
+ def available_users=(available_users)
320
+ if available_users.nil?
321
+ fail ArgumentError, 'available_users cannot be nil'
322
+ end
323
+
324
+ if available_users < 0
325
+ fail ArgumentError, 'invalid value for "available_users", must be greater than or equal to 0.'
326
+ end
327
+
328
+ @available_users = available_users
329
+ end
330
+
226
331
  # Custom attribute writer method with validation
227
332
  # @param [Object] deletions Value to be assigned
228
333
  def deletions=(deletions)
@@ -265,6 +370,9 @@ module Volcano::Generated
265
370
  bucket_start == o.bucket_start &&
266
371
  signups == o.signups &&
267
372
  signins == o.signins &&
373
+ banned_users == o.banned_users &&
374
+ deleted_users == o.deleted_users &&
375
+ available_users == o.available_users &&
268
376
  deletions == o.deletions &&
269
377
  net_growth == o.net_growth &&
270
378
  is_partial == o.is_partial
@@ -279,7 +387,7 @@ module Volcano::Generated
279
387
  # Calculates hash code according to all attributes.
280
388
  # @return [Integer] Hash code
281
389
  def hash
282
- [bucket_start, signups, signins, deletions, net_growth, is_partial].hash
390
+ [bucket_start, signups, signins, banned_users, deleted_users, available_users, deletions, net_growth, is_partial].hash
283
391
  end
284
392
 
285
393
  # Builds the object from hash
@@ -0,0 +1,45 @@
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 AutofixModel
18
+ AutofixModelClaudeFable51 = "claude-fable-5-1".freeze
19
+ AutofixModelClaudeOpus55 = "claude-opus-5-5".freeze
20
+ AutofixModelClaudeSonnet55 = "claude-sonnet-5-5".freeze
21
+ AutofixModelClaudeHaiku55 = "claude-haiku-5-5".freeze
22
+ AutofixModelClaudeOpus5 = "claude-opus-5".freeze
23
+ AutofixModelClaudeSonnet5 = "claude-sonnet-5".freeze
24
+ AutofixModelClaudeHaiku45 = "claude-haiku-4-5".freeze
25
+
26
+ def self.all_vars
27
+ @all_vars ||= [AutofixModelClaudeFable51, AutofixModelClaudeOpus55, AutofixModelClaudeSonnet55, AutofixModelClaudeHaiku55, AutofixModelClaudeOpus5, AutofixModelClaudeSonnet5, AutofixModelClaudeHaiku45].freeze
28
+ end
29
+
30
+ # Builds the enum from string
31
+ # @param [String] The enum value in the form of the string
32
+ # @return [String] The enum value
33
+ def self.build_from_hash(value)
34
+ new.build_from_hash(value)
35
+ end
36
+
37
+ # Builds the enum from string
38
+ # @param [String] The enum value in the form of the string
39
+ # @return [String] The enum value
40
+ def build_from_hash(value)
41
+ return value if AutofixModel.all_vars.include?(value)
42
+ raise "Invalid ENUM value #{value} for class #AutofixModel"
43
+ end
44
+ end
45
+ 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 AutofixProvider
18
+ AutofixProviderVolcano = "volcano".freeze
19
+ AutofixProviderAnthropic = "anthropic".freeze
20
+
21
+ def self.all_vars
22
+ @all_vars ||= [AutofixProviderVolcano, AutofixProviderAnthropic].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 AutofixProvider.all_vars.include?(value)
37
+ raise "Invalid ENUM value #{value} for class #AutofixProvider"
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,385 @@
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 AutofixSettings < ApiModelBase
18
+ attr_accessor :project_id
19
+
20
+ # Whether Volcano diagnoses the project's issues with AI.
21
+ attr_accessor :enabled
22
+
23
+ attr_accessor :max_stage
24
+
25
+ # Whether a new or reopened issue starts a run on its own. When false, runs start only on request.
26
+ attr_accessor :auto_trigger
27
+
28
+ attr_accessor :provider
29
+
30
+ attr_accessor :model
31
+
32
+ # Whether your own API key is stored. The key itself is never returned.
33
+ attr_accessor :api_key_configured
34
+
35
+ # The provider the stored key belongs to, present when one is stored.
36
+ attr_accessor :api_key_provider
37
+
38
+ # The stored key's last four characters, present when one is stored.
39
+ attr_accessor :api_key_last4
40
+
41
+ # Whether the owner's plan includes autofix. When false, saved settings stay stored and no run starts. Absent when a save that needed no plan succeeded but the plan could not be resolved.
42
+ attr_accessor :plan_includes_autofix
43
+
44
+ # When the settings were last saved. Absent until the first save.
45
+ attr_accessor :updated_at
46
+
47
+ class EnumAttributeValidator
48
+ attr_reader :datatype
49
+ attr_reader :allowable_values
50
+
51
+ def initialize(datatype, allowable_values)
52
+ @allowable_values = allowable_values.map do |value|
53
+ case datatype.to_s
54
+ when /Integer/i
55
+ value.to_i
56
+ when /Float/i
57
+ value.to_f
58
+ else
59
+ value
60
+ end
61
+ end
62
+ end
63
+
64
+ def valid?(value)
65
+ !value || allowable_values.include?(value)
66
+ end
67
+ end
68
+
69
+ # Attribute mapping from ruby-style variable name to JSON key.
70
+ def self.attribute_map
71
+ {
72
+ :'project_id' => :'project_id',
73
+ :'enabled' => :'enabled',
74
+ :'max_stage' => :'max_stage',
75
+ :'auto_trigger' => :'auto_trigger',
76
+ :'provider' => :'provider',
77
+ :'model' => :'model',
78
+ :'api_key_configured' => :'api_key_configured',
79
+ :'api_key_provider' => :'api_key_provider',
80
+ :'api_key_last4' => :'api_key_last4',
81
+ :'plan_includes_autofix' => :'plan_includes_autofix',
82
+ :'updated_at' => :'updated_at'
83
+ }
84
+ end
85
+
86
+ # Returns attribute mapping this model knows about
87
+ def self.acceptable_attribute_map
88
+ attribute_map
89
+ end
90
+
91
+ # Returns all the JSON keys this model knows about
92
+ def self.acceptable_attributes
93
+ acceptable_attribute_map.values
94
+ end
95
+
96
+ # Attribute type mapping.
97
+ def self.openapi_types
98
+ {
99
+ :'project_id' => :'String',
100
+ :'enabled' => :'Boolean',
101
+ :'max_stage' => :'AutofixStage',
102
+ :'auto_trigger' => :'Boolean',
103
+ :'provider' => :'AutofixProvider',
104
+ :'model' => :'AutofixModel',
105
+ :'api_key_configured' => :'Boolean',
106
+ :'api_key_provider' => :'AutofixProvider',
107
+ :'api_key_last4' => :'String',
108
+ :'plan_includes_autofix' => :'Boolean',
109
+ :'updated_at' => :'Time'
110
+ }
111
+ end
112
+
113
+ # List of attributes with nullable: true
114
+ def self.openapi_nullable
115
+ Set.new([
116
+ ])
117
+ end
118
+
119
+ # Initializes the object
120
+ # @param [Hash] attributes Model attributes in the form of hash
121
+ def initialize(attributes = {})
122
+ if (!attributes.is_a?(Hash))
123
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::AutofixSettings` initialize method"
124
+ end
125
+
126
+ # check to see if the attribute exists and convert string to symbol for hash key
127
+ acceptable_attribute_map = self.class.acceptable_attribute_map
128
+ attributes = attributes.each_with_object({}) { |(k, v), h|
129
+ if (!acceptable_attribute_map.key?(k.to_sym))
130
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::AutofixSettings`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
131
+ end
132
+ h[k.to_sym] = v
133
+ }
134
+
135
+ if attributes.key?(:'project_id')
136
+ self.project_id = attributes[:'project_id']
137
+ else
138
+ self.project_id = nil
139
+ end
140
+
141
+ if attributes.key?(:'enabled')
142
+ self.enabled = attributes[:'enabled']
143
+ else
144
+ self.enabled = nil
145
+ end
146
+
147
+ if attributes.key?(:'max_stage')
148
+ self.max_stage = attributes[:'max_stage']
149
+ else
150
+ self.max_stage = nil
151
+ end
152
+
153
+ if attributes.key?(:'auto_trigger')
154
+ self.auto_trigger = attributes[:'auto_trigger']
155
+ else
156
+ self.auto_trigger = nil
157
+ end
158
+
159
+ if attributes.key?(:'provider')
160
+ self.provider = attributes[:'provider']
161
+ else
162
+ self.provider = nil
163
+ end
164
+
165
+ if attributes.key?(:'model')
166
+ self.model = attributes[:'model']
167
+ else
168
+ self.model = nil
169
+ end
170
+
171
+ if attributes.key?(:'api_key_configured')
172
+ self.api_key_configured = attributes[:'api_key_configured']
173
+ else
174
+ self.api_key_configured = nil
175
+ end
176
+
177
+ if attributes.key?(:'api_key_provider')
178
+ self.api_key_provider = attributes[:'api_key_provider']
179
+ end
180
+
181
+ if attributes.key?(:'api_key_last4')
182
+ self.api_key_last4 = attributes[:'api_key_last4']
183
+ end
184
+
185
+ if attributes.key?(:'plan_includes_autofix')
186
+ self.plan_includes_autofix = attributes[:'plan_includes_autofix']
187
+ end
188
+
189
+ if attributes.key?(:'updated_at')
190
+ self.updated_at = attributes[:'updated_at']
191
+ end
192
+ end
193
+
194
+ # Show invalid properties with the reasons. Usually used together with valid?
195
+ # @return Array for valid properties with the reasons
196
+ def list_invalid_properties
197
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
198
+ invalid_properties = Array.new
199
+ if @project_id.nil?
200
+ invalid_properties.push('invalid value for "project_id", project_id cannot be nil.')
201
+ end
202
+
203
+ if @enabled.nil?
204
+ invalid_properties.push('invalid value for "enabled", enabled cannot be nil.')
205
+ end
206
+
207
+ if @max_stage.nil?
208
+ invalid_properties.push('invalid value for "max_stage", max_stage cannot be nil.')
209
+ end
210
+
211
+ if @auto_trigger.nil?
212
+ invalid_properties.push('invalid value for "auto_trigger", auto_trigger cannot be nil.')
213
+ end
214
+
215
+ if @provider.nil?
216
+ invalid_properties.push('invalid value for "provider", provider cannot be nil.')
217
+ end
218
+
219
+ if @model.nil?
220
+ invalid_properties.push('invalid value for "model", model cannot be nil.')
221
+ end
222
+
223
+ if @api_key_configured.nil?
224
+ invalid_properties.push('invalid value for "api_key_configured", api_key_configured cannot be nil.')
225
+ end
226
+
227
+ invalid_properties
228
+ end
229
+
230
+ # Check to see if the all the properties in the model are valid
231
+ # @return true if the model is valid
232
+ def valid?
233
+ warn '[DEPRECATED] the `valid?` method is obsolete'
234
+ return false if @project_id.nil?
235
+ return false if @enabled.nil?
236
+ return false if @max_stage.nil?
237
+ return false if @auto_trigger.nil?
238
+ return false if @provider.nil?
239
+ return false if @model.nil?
240
+ return false if @api_key_configured.nil?
241
+ true
242
+ end
243
+
244
+ # Custom attribute writer method with validation
245
+ # @param [Object] project_id Value to be assigned
246
+ def project_id=(project_id)
247
+ if project_id.nil?
248
+ fail ArgumentError, 'project_id cannot be nil'
249
+ end
250
+
251
+ @project_id = project_id
252
+ end
253
+
254
+ # Custom attribute writer method with validation
255
+ # @param [Object] enabled Value to be assigned
256
+ def enabled=(enabled)
257
+ if enabled.nil?
258
+ fail ArgumentError, 'enabled cannot be nil'
259
+ end
260
+
261
+ @enabled = enabled
262
+ end
263
+
264
+ # Custom attribute writer method with validation
265
+ # @param [Object] max_stage Value to be assigned
266
+ def max_stage=(max_stage)
267
+ if max_stage.nil?
268
+ fail ArgumentError, 'max_stage cannot be nil'
269
+ end
270
+
271
+ @max_stage = max_stage
272
+ end
273
+
274
+ # Custom attribute writer method with validation
275
+ # @param [Object] auto_trigger Value to be assigned
276
+ def auto_trigger=(auto_trigger)
277
+ if auto_trigger.nil?
278
+ fail ArgumentError, 'auto_trigger cannot be nil'
279
+ end
280
+
281
+ @auto_trigger = auto_trigger
282
+ end
283
+
284
+ # Custom attribute writer method with validation
285
+ # @param [Object] provider Value to be assigned
286
+ def provider=(provider)
287
+ if provider.nil?
288
+ fail ArgumentError, 'provider cannot be nil'
289
+ end
290
+
291
+ @provider = provider
292
+ end
293
+
294
+ # Custom attribute writer method with validation
295
+ # @param [Object] model Value to be assigned
296
+ def model=(model)
297
+ if model.nil?
298
+ fail ArgumentError, 'model cannot be nil'
299
+ end
300
+
301
+ @model = model
302
+ end
303
+
304
+ # Custom attribute writer method with validation
305
+ # @param [Object] api_key_configured Value to be assigned
306
+ def api_key_configured=(api_key_configured)
307
+ if api_key_configured.nil?
308
+ fail ArgumentError, 'api_key_configured cannot be nil'
309
+ end
310
+
311
+ @api_key_configured = api_key_configured
312
+ end
313
+
314
+ # Checks equality by comparing each attribute.
315
+ # @param [Object] Object to be compared
316
+ def ==(o)
317
+ return true if self.equal?(o)
318
+ self.class == o.class &&
319
+ project_id == o.project_id &&
320
+ enabled == o.enabled &&
321
+ max_stage == o.max_stage &&
322
+ auto_trigger == o.auto_trigger &&
323
+ provider == o.provider &&
324
+ model == o.model &&
325
+ api_key_configured == o.api_key_configured &&
326
+ api_key_provider == o.api_key_provider &&
327
+ api_key_last4 == o.api_key_last4 &&
328
+ plan_includes_autofix == o.plan_includes_autofix &&
329
+ updated_at == o.updated_at
330
+ end
331
+
332
+ # @see the `==` method
333
+ # @param [Object] Object to be compared
334
+ def eql?(o)
335
+ self == o
336
+ end
337
+
338
+ # Calculates hash code according to all attributes.
339
+ # @return [Integer] Hash code
340
+ def hash
341
+ [project_id, enabled, max_stage, auto_trigger, provider, model, api_key_configured, api_key_provider, api_key_last4, plan_includes_autofix, updated_at].hash
342
+ end
343
+
344
+ # Builds the object from hash
345
+ # @param [Hash] attributes Model attributes in the form of hash
346
+ # @return [Object] Returns the model itself
347
+ def self.build_from_hash(attributes)
348
+ return nil unless attributes.is_a?(Hash)
349
+ attributes = attributes.transform_keys(&:to_sym)
350
+ transformed_hash = {}
351
+ openapi_types.each_pair do |key, type|
352
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
353
+ transformed_hash["#{key}"] = nil
354
+ elsif type =~ /\AArray<(.*)>/i
355
+ # check to ensure the input is an array given that the attribute
356
+ # is documented as an array but the input is not
357
+ if attributes[attribute_map[key]].is_a?(Array)
358
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
359
+ end
360
+ elsif !attributes[attribute_map[key]].nil?
361
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
362
+ end
363
+ end
364
+ new(transformed_hash)
365
+ end
366
+
367
+ # Returns the object in the form of hash
368
+ # @return [Hash] Returns the object in the form of hash
369
+ def to_hash
370
+ hash = {}
371
+ self.class.attribute_map.each_pair do |attr, param|
372
+ value = self.send(attr)
373
+ if value.nil?
374
+ is_nullable = self.class.openapi_nullable.include?(attr)
375
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
376
+ end
377
+
378
+ hash[param] = _to_hash(value)
379
+ end
380
+ hash
381
+ end
382
+
383
+ end
384
+
385
+ 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 AutofixStage
18
+ AutofixStageDiagnose = "diagnose".freeze
19
+ AutofixStagePullRequest = "pull_request".freeze
20
+
21
+ def self.all_vars
22
+ @all_vars ||= [AutofixStageDiagnose, AutofixStagePullRequest].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 AutofixStage.all_vars.include?(value)
37
+ raise "Invalid ENUM value #{value} for class #AutofixStage"
38
+ end
39
+ end
40
+ end