daytona_api_client 0.202.0 → 0.204.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 (35) hide show
  1. checksums.yaml +4 -4
  2. data/.openapi-generator/FILES +13 -0
  3. data/lib/daytona_api_client/api/admin_api.rb +3 -0
  4. data/lib/daytona_api_client/api/audit_api.rb +57 -0
  5. data/lib/daytona_api_client/api/organizations_api.rb +485 -0
  6. data/lib/daytona_api_client/api/runners_api.rb +58 -0
  7. data/lib/daytona_api_client/api/snapshots_api.rb +3 -0
  8. data/lib/daytona_api_client/api/users_api.rb +173 -0
  9. data/lib/daytona_api_client/models/audit_scenarios.rb +167 -0
  10. data/lib/daytona_api_client/models/audit_target_scenario.rb +208 -0
  11. data/lib/daytona_api_client/models/create_identity_provider.rb +269 -0
  12. data/lib/daytona_api_client/models/create_organization_region_quota.rb +16 -5
  13. data/lib/daytona_api_client/models/create_sandbox.rb +12 -2
  14. data/lib/daytona_api_client/models/create_user.rb +26 -21
  15. data/lib/daytona_api_client/models/daytona_configuration.rb +33 -1
  16. data/lib/daytona_api_client/models/identity_provider.rb +439 -0
  17. data/lib/daytona_api_client/models/oidc_id_p_config.rb +229 -0
  18. data/lib/daytona_api_client/models/oidc_id_p_config_response.rb +202 -0
  19. data/lib/daytona_api_client/models/organization.rb +28 -1
  20. data/lib/daytona_api_client/models/organization_sso_enabled.rb +165 -0
  21. data/lib/daytona_api_client/models/pending_sso_link.rb +283 -0
  22. data/lib/daytona_api_client/models/region_quota.rb +18 -5
  23. data/lib/daytona_api_client/models/sandbox.rb +11 -1
  24. data/lib/daytona_api_client/models/sandbox_list_item.rb +48 -1
  25. data/lib/daytona_api_client/models/snapshot_dto.rb +14 -1
  26. data/lib/daytona_api_client/models/sso_oidc_config.rb +192 -0
  27. data/lib/daytona_api_client/models/test_identity_provider_connection.rb +165 -0
  28. data/lib/daytona_api_client/models/test_identity_provider_connection_response.rb +185 -0
  29. data/lib/daytona_api_client/models/update_identity_provider.rb +212 -0
  30. data/lib/daytona_api_client/models/update_oidc_id_p_config.rb +178 -0
  31. data/lib/daytona_api_client/models/update_organization_region_quota.rb +16 -5
  32. data/lib/daytona_api_client/models/user.rb +28 -1
  33. data/lib/daytona_api_client/version.rb +1 -1
  34. data/lib/daytona_api_client.rb +13 -0
  35. metadata +14 -1
@@ -0,0 +1,202 @@
1
+ =begin
2
+ #Daytona
3
+
4
+ #Daytona AI platform API Docs
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: support@daytona.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.21.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module DaytonaApiClient
17
+ class OidcIdPConfigResponse < ApiModelBase
18
+ # OIDC Issuer URL
19
+ attr_accessor :issuer_url
20
+
21
+ # OAuth Client ID
22
+ attr_accessor :client_id
23
+
24
+ # OAuth scopes
25
+ attr_accessor :scope
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ def self.attribute_map
29
+ {
30
+ :'issuer_url' => :'issuerUrl',
31
+ :'client_id' => :'clientId',
32
+ :'scope' => :'scope'
33
+ }
34
+ end
35
+
36
+ # Returns attribute mapping this model knows about
37
+ def self.acceptable_attribute_map
38
+ attribute_map
39
+ end
40
+
41
+ # Returns all the JSON keys this model knows about
42
+ def self.acceptable_attributes
43
+ acceptable_attribute_map.values
44
+ end
45
+
46
+ # Attribute type mapping.
47
+ def self.openapi_types
48
+ {
49
+ :'issuer_url' => :'String',
50
+ :'client_id' => :'String',
51
+ :'scope' => :'String'
52
+ }
53
+ end
54
+
55
+ # List of attributes with nullable: true
56
+ def self.openapi_nullable
57
+ Set.new([
58
+ ])
59
+ end
60
+
61
+ # Initializes the object
62
+ # @param [Hash] attributes Model attributes in the form of hash
63
+ def initialize(attributes = {})
64
+ if (!attributes.is_a?(Hash))
65
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::OidcIdPConfigResponse` initialize method"
66
+ end
67
+
68
+ # check to see if the attribute exists and convert string to symbol for hash key
69
+ acceptable_attribute_map = self.class.acceptable_attribute_map
70
+ attributes = attributes.each_with_object({}) { |(k, v), h|
71
+ if (!acceptable_attribute_map.key?(k.to_sym))
72
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::OidcIdPConfigResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
73
+ end
74
+ h[k.to_sym] = v
75
+ }
76
+
77
+ if attributes.key?(:'issuer_url')
78
+ self.issuer_url = attributes[:'issuer_url']
79
+ else
80
+ self.issuer_url = nil
81
+ end
82
+
83
+ if attributes.key?(:'client_id')
84
+ self.client_id = attributes[:'client_id']
85
+ else
86
+ self.client_id = nil
87
+ end
88
+
89
+ if attributes.key?(:'scope')
90
+ self.scope = attributes[:'scope']
91
+ end
92
+ end
93
+
94
+ # Show invalid properties with the reasons. Usually used together with valid?
95
+ # @return Array for valid properties with the reasons
96
+ def list_invalid_properties
97
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
98
+ invalid_properties = Array.new
99
+ if @issuer_url.nil?
100
+ invalid_properties.push('invalid value for "issuer_url", issuer_url cannot be nil.')
101
+ end
102
+
103
+ if @client_id.nil?
104
+ invalid_properties.push('invalid value for "client_id", client_id cannot be nil.')
105
+ end
106
+
107
+ invalid_properties
108
+ end
109
+
110
+ # Check to see if the all the properties in the model are valid
111
+ # @return true if the model is valid
112
+ def valid?
113
+ warn '[DEPRECATED] the `valid?` method is obsolete'
114
+ return false if @issuer_url.nil?
115
+ return false if @client_id.nil?
116
+ true
117
+ end
118
+
119
+ # Custom attribute writer method with validation
120
+ # @param [Object] issuer_url Value to be assigned
121
+ def issuer_url=(issuer_url)
122
+ if issuer_url.nil?
123
+ fail ArgumentError, 'issuer_url cannot be nil'
124
+ end
125
+
126
+ @issuer_url = issuer_url
127
+ end
128
+
129
+ # Custom attribute writer method with validation
130
+ # @param [Object] client_id Value to be assigned
131
+ def client_id=(client_id)
132
+ if client_id.nil?
133
+ fail ArgumentError, 'client_id cannot be nil'
134
+ end
135
+
136
+ @client_id = client_id
137
+ end
138
+
139
+ # Checks equality by comparing each attribute.
140
+ # @param [Object] Object to be compared
141
+ def ==(o)
142
+ return true if self.equal?(o)
143
+ self.class == o.class &&
144
+ issuer_url == o.issuer_url &&
145
+ client_id == o.client_id &&
146
+ scope == o.scope
147
+ end
148
+
149
+ # @see the `==` method
150
+ # @param [Object] Object to be compared
151
+ def eql?(o)
152
+ self == o
153
+ end
154
+
155
+ # Calculates hash code according to all attributes.
156
+ # @return [Integer] Hash code
157
+ def hash
158
+ [issuer_url, client_id, scope].hash
159
+ end
160
+
161
+ # Builds the object from hash
162
+ # @param [Hash] attributes Model attributes in the form of hash
163
+ # @return [Object] Returns the model itself
164
+ def self.build_from_hash(attributes)
165
+ return nil unless attributes.is_a?(Hash)
166
+ attributes = attributes.transform_keys(&:to_sym)
167
+ transformed_hash = {}
168
+ openapi_types.each_pair do |key, type|
169
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
170
+ transformed_hash["#{key}"] = nil
171
+ elsif type =~ /\AArray<(.*)>/i
172
+ # check to ensure the input is an array given that the attribute
173
+ # is documented as an array but the input is not
174
+ if attributes[attribute_map[key]].is_a?(Array)
175
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
176
+ end
177
+ elsif !attributes[attribute_map[key]].nil?
178
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
179
+ end
180
+ end
181
+ new(transformed_hash)
182
+ end
183
+
184
+ # Returns the object in the form of hash
185
+ # @return [Hash] Returns the object in the form of hash
186
+ def to_hash
187
+ hash = {}
188
+ self.class.attribute_map.each_pair do |attr, param|
189
+ value = self.send(attr)
190
+ if value.nil?
191
+ is_nullable = self.class.openapi_nullable.include?(attr)
192
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
193
+ end
194
+
195
+ hash[param] = _to_hash(value)
196
+ end
197
+ hash
198
+ end
199
+
200
+ end
201
+
202
+ end
@@ -72,6 +72,9 @@ module DaytonaApiClient
72
72
  # Whether the proxy shows the preview URL warning page for this organization
73
73
  attr_accessor :preview_warning_enabled
74
74
 
75
+ # Whether this organization may configure SSO identity providers
76
+ attr_accessor :sso_enabled
77
+
75
78
  # Default region ID
76
79
  attr_accessor :default_region_id
77
80
 
@@ -121,6 +124,7 @@ module DaytonaApiClient
121
124
  :'snapshot_deactivation_timeout_minutes' => :'snapshotDeactivationTimeoutMinutes',
122
125
  :'sandbox_limited_network_egress' => :'sandboxLimitedNetworkEgress',
123
126
  :'preview_warning_enabled' => :'previewWarningEnabled',
127
+ :'sso_enabled' => :'ssoEnabled',
124
128
  :'default_region_id' => :'defaultRegionId',
125
129
  :'authenticated_rate_limit' => :'authenticatedRateLimit',
126
130
  :'sandbox_create_rate_limit' => :'sandboxCreateRateLimit',
@@ -165,6 +169,7 @@ module DaytonaApiClient
165
169
  :'snapshot_deactivation_timeout_minutes' => :'Float',
166
170
  :'sandbox_limited_network_egress' => :'Boolean',
167
171
  :'preview_warning_enabled' => :'Boolean',
172
+ :'sso_enabled' => :'Boolean',
168
173
  :'default_region_id' => :'String',
169
174
  :'authenticated_rate_limit' => :'Float',
170
175
  :'sandbox_create_rate_limit' => :'Float',
@@ -320,6 +325,12 @@ module DaytonaApiClient
320
325
  self.preview_warning_enabled = nil
321
326
  end
322
327
 
328
+ if attributes.key?(:'sso_enabled')
329
+ self.sso_enabled = attributes[:'sso_enabled']
330
+ else
331
+ self.sso_enabled = nil
332
+ end
333
+
323
334
  if attributes.key?(:'default_region_id')
324
335
  self.default_region_id = attributes[:'default_region_id']
325
336
  end
@@ -454,6 +465,10 @@ module DaytonaApiClient
454
465
  invalid_properties.push('invalid value for "preview_warning_enabled", preview_warning_enabled cannot be nil.')
455
466
  end
456
467
 
468
+ if @sso_enabled.nil?
469
+ invalid_properties.push('invalid value for "sso_enabled", sso_enabled cannot be nil.')
470
+ end
471
+
457
472
  if @experimental_config.nil?
458
473
  invalid_properties.push('invalid value for "experimental_config", experimental_config cannot be nil.')
459
474
  end
@@ -484,6 +499,7 @@ module DaytonaApiClient
484
499
  return false if @snapshot_deactivation_timeout_minutes.nil?
485
500
  return false if @sandbox_limited_network_egress.nil?
486
501
  return false if @preview_warning_enabled.nil?
502
+ return false if @sso_enabled.nil?
487
503
  return false if @experimental_config.nil?
488
504
  true
489
505
  end
@@ -678,6 +694,16 @@ module DaytonaApiClient
678
694
  @preview_warning_enabled = preview_warning_enabled
679
695
  end
680
696
 
697
+ # Custom attribute writer method with validation
698
+ # @param [Object] sso_enabled Value to be assigned
699
+ def sso_enabled=(sso_enabled)
700
+ if sso_enabled.nil?
701
+ fail ArgumentError, 'sso_enabled cannot be nil'
702
+ end
703
+
704
+ @sso_enabled = sso_enabled
705
+ end
706
+
681
707
  # Custom attribute writer method with validation
682
708
  # @param [Object] experimental_config Value to be assigned
683
709
  def experimental_config=(experimental_config)
@@ -712,6 +738,7 @@ module DaytonaApiClient
712
738
  snapshot_deactivation_timeout_minutes == o.snapshot_deactivation_timeout_minutes &&
713
739
  sandbox_limited_network_egress == o.sandbox_limited_network_egress &&
714
740
  preview_warning_enabled == o.preview_warning_enabled &&
741
+ sso_enabled == o.sso_enabled &&
715
742
  default_region_id == o.default_region_id &&
716
743
  authenticated_rate_limit == o.authenticated_rate_limit &&
717
744
  sandbox_create_rate_limit == o.sandbox_create_rate_limit &&
@@ -732,7 +759,7 @@ module DaytonaApiClient
732
759
  # Calculates hash code according to all attributes.
733
760
  # @return [Integer] Hash code
734
761
  def hash
735
- [id, name, created_by, personal, created_at, updated_at, suspended, suspended_at, suspension_reason, suspended_until, suspension_cleanup_grace_period_hours, max_cpu_per_sandbox, max_memory_per_sandbox, max_disk_per_sandbox, secret_quota, max_secrets_per_sandbox, snapshot_deactivation_timeout_minutes, sandbox_limited_network_egress, preview_warning_enabled, default_region_id, authenticated_rate_limit, sandbox_create_rate_limit, sandbox_lifecycle_rate_limit, experimental_config, otel_config, authenticated_rate_limit_ttl_seconds, sandbox_create_rate_limit_ttl_seconds, sandbox_lifecycle_rate_limit_ttl_seconds].hash
762
+ [id, name, created_by, personal, created_at, updated_at, suspended, suspended_at, suspension_reason, suspended_until, suspension_cleanup_grace_period_hours, max_cpu_per_sandbox, max_memory_per_sandbox, max_disk_per_sandbox, secret_quota, max_secrets_per_sandbox, snapshot_deactivation_timeout_minutes, sandbox_limited_network_egress, preview_warning_enabled, sso_enabled, default_region_id, authenticated_rate_limit, sandbox_create_rate_limit, sandbox_lifecycle_rate_limit, experimental_config, otel_config, authenticated_rate_limit_ttl_seconds, sandbox_create_rate_limit_ttl_seconds, sandbox_lifecycle_rate_limit_ttl_seconds].hash
736
763
  end
737
764
 
738
765
  # Builds the object from hash
@@ -0,0 +1,165 @@
1
+ =begin
2
+ #Daytona
3
+
4
+ #Daytona AI platform API Docs
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: support@daytona.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.21.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module DaytonaApiClient
17
+ class OrganizationSsoEnabled < ApiModelBase
18
+ # Whether this organization may configure SSO identity providers
19
+ attr_accessor :sso_enabled
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'sso_enabled' => :'ssoEnabled'
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
+ :'sso_enabled' => :'Boolean'
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 `DaytonaApiClient::OrganizationSsoEnabled` 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 `DaytonaApiClient::OrganizationSsoEnabled`. 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?(:'sso_enabled')
68
+ self.sso_enabled = attributes[:'sso_enabled']
69
+ else
70
+ self.sso_enabled = 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 @sso_enabled.nil?
80
+ invalid_properties.push('invalid value for "sso_enabled", sso_enabled cannot be nil.')
81
+ end
82
+
83
+ invalid_properties
84
+ end
85
+
86
+ # Check to see if the all the properties in the model are valid
87
+ # @return true if the model is valid
88
+ def valid?
89
+ warn '[DEPRECATED] the `valid?` method is obsolete'
90
+ return false if @sso_enabled.nil?
91
+ true
92
+ end
93
+
94
+ # Custom attribute writer method with validation
95
+ # @param [Object] sso_enabled Value to be assigned
96
+ def sso_enabled=(sso_enabled)
97
+ if sso_enabled.nil?
98
+ fail ArgumentError, 'sso_enabled cannot be nil'
99
+ end
100
+
101
+ @sso_enabled = sso_enabled
102
+ end
103
+
104
+ # Checks equality by comparing each attribute.
105
+ # @param [Object] Object to be compared
106
+ def ==(o)
107
+ return true if self.equal?(o)
108
+ self.class == o.class &&
109
+ sso_enabled == o.sso_enabled
110
+ end
111
+
112
+ # @see the `==` method
113
+ # @param [Object] Object to be compared
114
+ def eql?(o)
115
+ self == o
116
+ end
117
+
118
+ # Calculates hash code according to all attributes.
119
+ # @return [Integer] Hash code
120
+ def hash
121
+ [sso_enabled].hash
122
+ end
123
+
124
+ # Builds the object from hash
125
+ # @param [Hash] attributes Model attributes in the form of hash
126
+ # @return [Object] Returns the model itself
127
+ def self.build_from_hash(attributes)
128
+ return nil unless attributes.is_a?(Hash)
129
+ attributes = attributes.transform_keys(&:to_sym)
130
+ transformed_hash = {}
131
+ openapi_types.each_pair do |key, type|
132
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
133
+ transformed_hash["#{key}"] = nil
134
+ elsif type =~ /\AArray<(.*)>/i
135
+ # check to ensure the input is an array given that the attribute
136
+ # is documented as an array but the input is not
137
+ if attributes[attribute_map[key]].is_a?(Array)
138
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
139
+ end
140
+ elsif !attributes[attribute_map[key]].nil?
141
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
142
+ end
143
+ end
144
+ new(transformed_hash)
145
+ end
146
+
147
+ # Returns the object in the form of hash
148
+ # @return [Hash] Returns the object in the form of hash
149
+ def to_hash
150
+ hash = {}
151
+ self.class.attribute_map.each_pair do |attr, param|
152
+ value = self.send(attr)
153
+ if value.nil?
154
+ is_nullable = self.class.openapi_nullable.include?(attr)
155
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
156
+ end
157
+
158
+ hash[param] = _to_hash(value)
159
+ end
160
+ hash
161
+ end
162
+
163
+ end
164
+
165
+ end