Class: DaytonaApiClient::DaytonaConfiguration

Inherits:
ApiModelBase
  • Object
show all
Defined in:
lib/daytona_api_client/models/daytona_configuration.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ApiModelBase

_deserialize, #_to_hash, #to_body, #to_s

Constructor Details

#initialize(attributes = {}) ⇒ DaytonaConfiguration

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



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
248
249
250
251
252
253
254
255
256
# File 'lib/daytona_api_client/models/daytona_configuration.rb', line 143

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?(:'stripe_publishable_key')
    self.stripe_publishable_key = attributes[:'stripe_publishable_key']
  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_urlObject

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

#announcementsObject

System announcements



31
32
33
# File 'lib/daytona_api_client/models/daytona_configuration.rb', line 31

def announcements
  @announcements
end

#billing_api_urlObject

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_urlObject

Dashboard URL



46
47
48
# File 'lib/daytona_api_client/models/daytona_configuration.rb', line 46

def dashboard_url
  @dashboard_url
end

#default_snapshotObject

Default snapshot for sandboxes



43
44
45
# File 'lib/daytona_api_client/models/daytona_configuration.rb', line 43

def default_snapshot
  @default_snapshot
end

#environmentObject

Current environment



55
56
57
# File 'lib/daytona_api_client/models/daytona_configuration.rb', line 55

def environment
  @environment
end

#linked_accounts_enabledObject

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_modeObject

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_intervalObject

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

#oidcObject

OIDC configuration



25
26
27
# File 'lib/daytona_api_client/models/daytona_configuration.rb', line 25

def oidc
  @oidc
end

#posthogObject

PostHog configuration



22
23
24
# File 'lib/daytona_api_client/models/daytona_configuration.rb', line 22

def posthog
  @posthog
end

#proxy_template_urlObject

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_urlObject

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_idObject

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_limitObject

Rate limit configuration



73
74
75
# File 'lib/daytona_api_client/models/daytona_configuration.rb', line 73

def rate_limit
  @rate_limit
end

#ssh_gateway_commandObject

SSH Gateway command



67
68
69
# File 'lib/daytona_api_client/models/daytona_configuration.rb', line 67

def ssh_gateway_command
  @ssh_gateway_command
end

#ssh_gateway_public_keyObject

Base64 encoded SSH Gateway public key



70
71
72
# File 'lib/daytona_api_client/models/daytona_configuration.rb', line 70

def ssh_gateway_public_key
  @ssh_gateway_public_key
end

#stripe_publishable_keyObject

Stripe publishable key for client-side Stripe.js



64
65
66
# File 'lib/daytona_api_client/models/daytona_configuration.rb', line 64

def stripe_publishable_key
  @stripe_publishable_key
end

#versionObject

Daytona version



19
20
21
# File 'lib/daytona_api_client/models/daytona_configuration.rb', line 19

def version
  @version
end

Class Method Details

.acceptable_attribute_mapObject

Returns attribute mapping this model knows about



101
102
103
# File 'lib/daytona_api_client/models/daytona_configuration.rb', line 101

def self.acceptable_attribute_map
  attribute_map
end

.acceptable_attributesObject

Returns all the JSON keys this model knows about



106
107
108
# File 'lib/daytona_api_client/models/daytona_configuration.rb', line 106

def self.acceptable_attributes
  acceptable_attribute_map.values
end

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# File 'lib/daytona_api_client/models/daytona_configuration.rb', line 76

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',
    :'stripe_publishable_key' => :'stripePublishableKey',
    :'ssh_gateway_command' => :'sshGatewayCommand',
    :'ssh_gateway_public_key' => :'sshGatewayPublicKey',
    :'rate_limit' => :'rateLimit'
  }
end

.build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
# File 'lib/daytona_api_client/models/daytona_configuration.rb', line 479

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_nullableObject

List of attributes with nullable: true



136
137
138
139
# File 'lib/daytona_api_client/models/daytona_configuration.rb', line 136

def self.openapi_nullable
  Set.new([
  ])
end

.openapi_typesObject

Attribute type mapping.



111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# File 'lib/daytona_api_client/models/daytona_configuration.rb', line 111

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',
    :'stripe_publishable_key' => :'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.

Parameters:

  • Object (Object)

    to be compared



440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
# File 'lib/daytona_api_client/models/daytona_configuration.rb', line 440

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 &&
      stripe_publishable_key == o.stripe_publishable_key &&
      ssh_gateway_command == o.ssh_gateway_command &&
      ssh_gateway_public_key == o.ssh_gateway_public_key &&
      rate_limit == o.rate_limit
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


466
467
468
# File 'lib/daytona_api_client/models/daytona_configuration.rb', line 466

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



472
473
474
# File 'lib/daytona_api_client/models/daytona_configuration.rb', line 472

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, stripe_publishable_key, ssh_gateway_command, ssh_gateway_public_key, rate_limit].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



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
300
301
302
303
304
305
306
307
308
# File 'lib/daytona_api_client/models/daytona_configuration.rb', line 260

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_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



501
502
503
504
505
506
507
508
509
510
511
512
513
# File 'lib/daytona_api_client/models/daytona_configuration.rb', line 501

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

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
# File 'lib/daytona_api_client/models/daytona_configuration.rb', line 312

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