Class: DaytonaApiClient::DaytonaConfiguration
- Inherits:
-
Object
- Object
- DaytonaApiClient::DaytonaConfiguration
- Defined in:
- lib/daytona_api_client/models/daytona_configuration.rb
Instance Attribute Summary collapse
-
#analytics_api_url ⇒ Object
Analytics API URL.
-
#announcements ⇒ Object
System announcements.
-
#billing_api_url ⇒ Object
Billing API URL.
-
#dashboard_url ⇒ Object
Dashboard URL.
-
#default_snapshot ⇒ Object
Default snapshot for sandboxes.
-
#environment ⇒ Object
Current environment.
-
#linked_accounts_enabled ⇒ Object
Whether linked accounts are enabled.
-
#maintanance_mode ⇒ Object
Whether maintenance mode is enabled.
-
#max_auto_archive_interval ⇒ Object
Maximum auto-archive interval in minutes.
-
#oidc ⇒ Object
OIDC configuration.
-
#posthog ⇒ Object
PostHog configuration.
-
#proxy_template_url ⇒ Object
Proxy template URL.
-
#proxy_toolbox_url ⇒ Object
Toolbox template URL.
-
#pylon_app_id ⇒ Object
Pylon application ID.
-
#rate_limit ⇒ Object
Rate limit configuration.
-
#ssh_gateway_command ⇒ Object
SSH Gateway command.
-
#ssh_gateway_public_key ⇒ Object
Base64 encoded SSH Gateway public key.
-
#version ⇒ Object
Daytona version.
Class Method Summary collapse
-
._deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about.
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ DaytonaConfiguration
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ DaytonaConfiguration
Initializes the object
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 |
# File 'lib/daytona_api_client/models/daytona_configuration.rb', line 138 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::DaytonaConfiguration` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!acceptable_attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::DaytonaConfiguration`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'version') self.version = attributes[:'version'] else self.version = nil end if attributes.key?(:'posthog') self.posthog = attributes[:'posthog'] end if attributes.key?(:'oidc') self.oidc = attributes[:'oidc'] else self.oidc = nil end if attributes.key?(:'linked_accounts_enabled') self.linked_accounts_enabled = attributes[:'linked_accounts_enabled'] else self.linked_accounts_enabled = nil end if attributes.key?(:'announcements') if (value = attributes[:'announcements']).is_a?(Hash) self.announcements = value end else self.announcements = nil end if attributes.key?(:'pylon_app_id') self.pylon_app_id = attributes[:'pylon_app_id'] end if attributes.key?(:'proxy_template_url') self.proxy_template_url = attributes[:'proxy_template_url'] else self.proxy_template_url = nil end if attributes.key?(:'proxy_toolbox_url') self.proxy_toolbox_url = attributes[:'proxy_toolbox_url'] else self.proxy_toolbox_url = nil end if attributes.key?(:'default_snapshot') self.default_snapshot = attributes[:'default_snapshot'] else self.default_snapshot = nil end if attributes.key?(:'dashboard_url') self.dashboard_url = attributes[:'dashboard_url'] else self.dashboard_url = nil end if attributes.key?(:'max_auto_archive_interval') self.max_auto_archive_interval = attributes[:'max_auto_archive_interval'] else self.max_auto_archive_interval = nil end if attributes.key?(:'maintanance_mode') self.maintanance_mode = attributes[:'maintanance_mode'] else self.maintanance_mode = nil end if attributes.key?(:'environment') self.environment = attributes[:'environment'] else self.environment = nil end if attributes.key?(:'billing_api_url') self.billing_api_url = attributes[:'billing_api_url'] end if attributes.key?(:'analytics_api_url') self.analytics_api_url = attributes[:'analytics_api_url'] end if attributes.key?(:'ssh_gateway_command') self.ssh_gateway_command = attributes[:'ssh_gateway_command'] end if attributes.key?(:'ssh_gateway_public_key') self.ssh_gateway_public_key = attributes[:'ssh_gateway_public_key'] end if attributes.key?(:'rate_limit') self.rate_limit = attributes[:'rate_limit'] end end |
Instance Attribute Details
#analytics_api_url ⇒ Object
Analytics API URL
61 62 63 |
# File 'lib/daytona_api_client/models/daytona_configuration.rb', line 61 def analytics_api_url @analytics_api_url end |
#announcements ⇒ Object
System announcements
31 32 33 |
# File 'lib/daytona_api_client/models/daytona_configuration.rb', line 31 def announcements @announcements end |
#billing_api_url ⇒ Object
Billing API URL
58 59 60 |
# File 'lib/daytona_api_client/models/daytona_configuration.rb', line 58 def billing_api_url @billing_api_url end |
#dashboard_url ⇒ Object
Dashboard URL
46 47 48 |
# File 'lib/daytona_api_client/models/daytona_configuration.rb', line 46 def dashboard_url @dashboard_url end |
#default_snapshot ⇒ Object
Default snapshot for sandboxes
43 44 45 |
# File 'lib/daytona_api_client/models/daytona_configuration.rb', line 43 def default_snapshot @default_snapshot end |
#environment ⇒ Object
Current environment
55 56 57 |
# File 'lib/daytona_api_client/models/daytona_configuration.rb', line 55 def environment @environment end |
#linked_accounts_enabled ⇒ Object
Whether linked accounts are enabled
28 29 30 |
# File 'lib/daytona_api_client/models/daytona_configuration.rb', line 28 def linked_accounts_enabled @linked_accounts_enabled end |
#maintanance_mode ⇒ Object
Whether maintenance mode is enabled
52 53 54 |
# File 'lib/daytona_api_client/models/daytona_configuration.rb', line 52 def maintanance_mode @maintanance_mode end |
#max_auto_archive_interval ⇒ Object
Maximum auto-archive interval in minutes
49 50 51 |
# File 'lib/daytona_api_client/models/daytona_configuration.rb', line 49 def max_auto_archive_interval @max_auto_archive_interval end |
#oidc ⇒ Object
OIDC configuration
25 26 27 |
# File 'lib/daytona_api_client/models/daytona_configuration.rb', line 25 def oidc @oidc end |
#posthog ⇒ Object
PostHog configuration
22 23 24 |
# File 'lib/daytona_api_client/models/daytona_configuration.rb', line 22 def posthog @posthog end |
#proxy_template_url ⇒ Object
Proxy template URL
37 38 39 |
# File 'lib/daytona_api_client/models/daytona_configuration.rb', line 37 def proxy_template_url @proxy_template_url end |
#proxy_toolbox_url ⇒ Object
Toolbox template URL
40 41 42 |
# File 'lib/daytona_api_client/models/daytona_configuration.rb', line 40 def proxy_toolbox_url @proxy_toolbox_url end |
#pylon_app_id ⇒ Object
Pylon application ID
34 35 36 |
# File 'lib/daytona_api_client/models/daytona_configuration.rb', line 34 def pylon_app_id @pylon_app_id end |
#rate_limit ⇒ Object
Rate limit configuration
70 71 72 |
# File 'lib/daytona_api_client/models/daytona_configuration.rb', line 70 def rate_limit @rate_limit end |
#ssh_gateway_command ⇒ Object
SSH Gateway command
64 65 66 |
# File 'lib/daytona_api_client/models/daytona_configuration.rb', line 64 def ssh_gateway_command @ssh_gateway_command end |
#ssh_gateway_public_key ⇒ Object
Base64 encoded SSH Gateway public key
67 68 69 |
# File 'lib/daytona_api_client/models/daytona_configuration.rb', line 67 def ssh_gateway_public_key @ssh_gateway_public_key end |
#version ⇒ Object
Daytona version
19 20 21 |
# File 'lib/daytona_api_client/models/daytona_configuration.rb', line 19 def version @version end |
Class Method Details
._deserialize(type, value) ⇒ Object
Deserializes the data based on type
493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 |
# File 'lib/daytona_api_client/models/daytona_configuration.rb', line 493 def self._deserialize(type, value) case type.to_sym when :Time Time.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model # models (e.g. Pet) or oneOf klass = DaytonaApiClient.const_get(type) klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end |
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
97 98 99 |
# File 'lib/daytona_api_client/models/daytona_configuration.rb', line 97 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
102 103 104 |
# File 'lib/daytona_api_client/models/daytona_configuration.rb', line 102 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/daytona_api_client/models/daytona_configuration.rb', line 73 def self.attribute_map { :'version' => :'version', :'posthog' => :'posthog', :'oidc' => :'oidc', :'linked_accounts_enabled' => :'linkedAccountsEnabled', :'announcements' => :'announcements', :'pylon_app_id' => :'pylonAppId', :'proxy_template_url' => :'proxyTemplateUrl', :'proxy_toolbox_url' => :'proxyToolboxUrl', :'default_snapshot' => :'defaultSnapshot', :'dashboard_url' => :'dashboardUrl', :'max_auto_archive_interval' => :'maxAutoArchiveInterval', :'maintanance_mode' => :'maintananceMode', :'environment' => :'environment', :'billing_api_url' => :'billingApiUrl', :'analytics_api_url' => :'analyticsApiUrl', :'ssh_gateway_command' => :'sshGatewayCommand', :'ssh_gateway_public_key' => :'sshGatewayPublicKey', :'rate_limit' => :'rateLimit' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 |
# File 'lib/daytona_api_client/models/daytona_configuration.rb', line 469 def self.build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) transformed_hash = {} openapi_types.each_pair do |key, type| if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[attribute_map[key]].is_a?(Array) transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end elsif !attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end new(transformed_hash) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
131 132 133 134 |
# File 'lib/daytona_api_client/models/daytona_configuration.rb', line 131 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 |
# File 'lib/daytona_api_client/models/daytona_configuration.rb', line 107 def self.openapi_types { :'version' => :'String', :'posthog' => :'PosthogConfig', :'oidc' => :'OidcConfig', :'linked_accounts_enabled' => :'Boolean', :'announcements' => :'Hash<String, Announcement>', :'pylon_app_id' => :'String', :'proxy_template_url' => :'String', :'proxy_toolbox_url' => :'String', :'default_snapshot' => :'String', :'dashboard_url' => :'String', :'max_auto_archive_interval' => :'Float', :'maintanance_mode' => :'Boolean', :'environment' => :'String', :'billing_api_url' => :'String', :'analytics_api_url' => :'String', :'ssh_gateway_command' => :'String', :'ssh_gateway_public_key' => :'String', :'rate_limit' => :'RateLimitConfig' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 |
# File 'lib/daytona_api_client/models/daytona_configuration.rb', line 431 def ==(o) return true if self.equal?(o) self.class == o.class && version == o.version && posthog == o.posthog && oidc == o.oidc && linked_accounts_enabled == o.linked_accounts_enabled && announcements == o.announcements && pylon_app_id == o.pylon_app_id && proxy_template_url == o.proxy_template_url && proxy_toolbox_url == o.proxy_toolbox_url && default_snapshot == o.default_snapshot && dashboard_url == o.dashboard_url && max_auto_archive_interval == o.max_auto_archive_interval && maintanance_mode == o.maintanance_mode && environment == o.environment && billing_api_url == o.billing_api_url && analytics_api_url == o.analytics_api_url && ssh_gateway_command == o.ssh_gateway_command && ssh_gateway_public_key == o.ssh_gateway_public_key && rate_limit == o.rate_limit end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
564 565 566 567 568 569 570 571 572 573 574 575 576 |
# File 'lib/daytona_api_client/models/daytona_configuration.rb', line 564 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#eql?(o) ⇒ Boolean
456 457 458 |
# File 'lib/daytona_api_client/models/daytona_configuration.rb', line 456 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
462 463 464 |
# File 'lib/daytona_api_client/models/daytona_configuration.rb', line 462 def hash [version, posthog, oidc, linked_accounts_enabled, announcements, pylon_app_id, proxy_template_url, proxy_toolbox_url, default_snapshot, dashboard_url, max_auto_archive_interval, maintanance_mode, environment, billing_api_url, analytics_api_url, ssh_gateway_command, ssh_gateway_public_key, rate_limit].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 |
# File 'lib/daytona_api_client/models/daytona_configuration.rb', line 251 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @version.nil? invalid_properties.push('invalid value for "version", version cannot be nil.') end if @oidc.nil? invalid_properties.push('invalid value for "oidc", oidc cannot be nil.') end if @linked_accounts_enabled.nil? invalid_properties.push('invalid value for "linked_accounts_enabled", linked_accounts_enabled cannot be nil.') end if @announcements.nil? invalid_properties.push('invalid value for "announcements", announcements cannot be nil.') end if @proxy_template_url.nil? invalid_properties.push('invalid value for "proxy_template_url", proxy_template_url cannot be nil.') end if @proxy_toolbox_url.nil? invalid_properties.push('invalid value for "proxy_toolbox_url", proxy_toolbox_url cannot be nil.') end if @default_snapshot.nil? invalid_properties.push('invalid value for "default_snapshot", default_snapshot cannot be nil.') end if @dashboard_url.nil? invalid_properties.push('invalid value for "dashboard_url", dashboard_url cannot be nil.') end if @max_auto_archive_interval.nil? invalid_properties.push('invalid value for "max_auto_archive_interval", max_auto_archive_interval cannot be nil.') end if @maintanance_mode.nil? invalid_properties.push('invalid value for "maintanance_mode", maintanance_mode cannot be nil.') end if @environment.nil? invalid_properties.push('invalid value for "environment", environment cannot be nil.') end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
540 541 542 |
# File 'lib/daytona_api_client/models/daytona_configuration.rb', line 540 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
546 547 548 549 550 551 552 553 554 555 556 557 558 |
# File 'lib/daytona_api_client/models/daytona_configuration.rb', line 546 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
534 535 536 |
# File 'lib/daytona_api_client/models/daytona_configuration.rb', line 534 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 |
# File 'lib/daytona_api_client/models/daytona_configuration.rb', line 303 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if @version.nil? return false if @oidc.nil? return false if @linked_accounts_enabled.nil? return false if @announcements.nil? return false if @proxy_template_url.nil? return false if @proxy_toolbox_url.nil? return false if @default_snapshot.nil? return false if @dashboard_url.nil? return false if @max_auto_archive_interval.nil? return false if @maintanance_mode.nil? return false if @environment.nil? true end |