daytona_api_client 0.126.0.alpha.6
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 +7 -0
- data/.gitignore +39 -0
- data/.openapi-generator/FILES +171 -0
- data/.openapi-generator/VERSION +1 -0
- data/.openapi-generator-ignore +33 -0
- data/.rspec +2 -0
- data/.rubocop.yml +148 -0
- data/Gemfile +9 -0
- data/Gemfile.lock +101 -0
- data/Rakefile +10 -0
- data/daytona_api_client.gemspec +39 -0
- data/fix-gemspec.sh +11 -0
- data/lib/daytona_api_client/api/api_keys_api.rb +401 -0
- data/lib/daytona_api_client/api/audit_api.rb +192 -0
- data/lib/daytona_api_client/api/config_api.rb +77 -0
- data/lib/daytona_api_client/api/docker_registry_api.rb +472 -0
- data/lib/daytona_api_client/api/health_api.rb +75 -0
- data/lib/daytona_api_client/api/object_storage_api.rb +80 -0
- data/lib/daytona_api_client/api/organizations_api.rb +1902 -0
- data/lib/daytona_api_client/api/preview_api.rb +211 -0
- data/lib/daytona_api_client/api/regions_api.rb +83 -0
- data/lib/daytona_api_client/api/runners_api.rb +376 -0
- data/lib/daytona_api_client/api/sandbox_api.rb +1660 -0
- data/lib/daytona_api_client/api/snapshots_api.rb +641 -0
- data/lib/daytona_api_client/api/toolbox_api.rb +5108 -0
- data/lib/daytona_api_client/api/users_api.rb +553 -0
- data/lib/daytona_api_client/api/volumes_api.rb +342 -0
- data/lib/daytona_api_client/api/webhooks_api.rb +413 -0
- data/lib/daytona_api_client/api/workspace_api.rb +955 -0
- data/lib/daytona_api_client/api_client.rb +393 -0
- data/lib/daytona_api_client/api_error.rb +58 -0
- data/lib/daytona_api_client/configuration.rb +306 -0
- data/lib/daytona_api_client/models/account_provider.rb +261 -0
- data/lib/daytona_api_client/models/announcement.rb +246 -0
- data/lib/daytona_api_client/models/api_key_list.rb +384 -0
- data/lib/daytona_api_client/models/api_key_response.rb +344 -0
- data/lib/daytona_api_client/models/audit_log.rb +422 -0
- data/lib/daytona_api_client/models/build_info.rb +285 -0
- data/lib/daytona_api_client/models/command.rb +273 -0
- data/lib/daytona_api_client/models/completion_context.rb +244 -0
- data/lib/daytona_api_client/models/completion_item.rb +289 -0
- data/lib/daytona_api_client/models/completion_list.rb +263 -0
- data/lib/daytona_api_client/models/compressed_screenshot_response.rb +256 -0
- data/lib/daytona_api_client/models/computer_use_start_response.rb +263 -0
- data/lib/daytona_api_client/models/computer_use_status_response.rb +260 -0
- data/lib/daytona_api_client/models/computer_use_stop_response.rb +263 -0
- data/lib/daytona_api_client/models/create_api_key.rb +288 -0
- data/lib/daytona_api_client/models/create_audit_log.rb +350 -0
- data/lib/daytona_api_client/models/create_build_info.rb +248 -0
- data/lib/daytona_api_client/models/create_docker_registry.rb +388 -0
- data/lib/daytona_api_client/models/create_linked_account.rb +263 -0
- data/lib/daytona_api_client/models/create_organization.rb +263 -0
- data/lib/daytona_api_client/models/create_organization_invitation.rb +326 -0
- data/lib/daytona_api_client/models/create_organization_quota.rb +290 -0
- data/lib/daytona_api_client/models/create_organization_role.rb +304 -0
- data/lib/daytona_api_client/models/create_runner.rb +545 -0
- data/lib/daytona_api_client/models/create_sandbox.rb +439 -0
- data/lib/daytona_api_client/models/create_session_request.rb +236 -0
- data/lib/daytona_api_client/models/create_snapshot.rb +318 -0
- data/lib/daytona_api_client/models/create_user.rb +340 -0
- data/lib/daytona_api_client/models/create_volume.rb +235 -0
- data/lib/daytona_api_client/models/create_workspace.rb +411 -0
- data/lib/daytona_api_client/models/daytona_configuration.rb +568 -0
- data/lib/daytona_api_client/models/display_info_response.rb +238 -0
- data/lib/daytona_api_client/models/docker_registry.rb +449 -0
- data/lib/daytona_api_client/models/download_files.rb +238 -0
- data/lib/daytona_api_client/models/execute_request.rb +255 -0
- data/lib/daytona_api_client/models/execute_response.rb +263 -0
- data/lib/daytona_api_client/models/file_info.rb +417 -0
- data/lib/daytona_api_client/models/file_status.rb +313 -0
- data/lib/daytona_api_client/models/git_add_request.rb +264 -0
- data/lib/daytona_api_client/models/git_branch_request.rb +261 -0
- data/lib/daytona_api_client/models/git_checkout_request.rb +261 -0
- data/lib/daytona_api_client/models/git_clone_request.rb +297 -0
- data/lib/daytona_api_client/models/git_commit_info.rb +339 -0
- data/lib/daytona_api_client/models/git_commit_request.rb +325 -0
- data/lib/daytona_api_client/models/git_commit_response.rb +235 -0
- data/lib/daytona_api_client/models/git_delete_branch_request.rb +261 -0
- data/lib/daytona_api_client/models/git_repo_request.rb +253 -0
- data/lib/daytona_api_client/models/git_status.rb +290 -0
- data/lib/daytona_api_client/models/health_controller_check200_response.rb +253 -0
- data/lib/daytona_api_client/models/health_controller_check200_response_info_value.rb +235 -0
- data/lib/daytona_api_client/models/health_controller_check503_response.rb +253 -0
- data/lib/daytona_api_client/models/keyboard_hotkey_request.rb +236 -0
- data/lib/daytona_api_client/models/keyboard_press_request.rb +248 -0
- data/lib/daytona_api_client/models/keyboard_type_request.rb +246 -0
- data/lib/daytona_api_client/models/list_branch_response.rb +237 -0
- data/lib/daytona_api_client/models/lsp_completion_params.rb +325 -0
- data/lib/daytona_api_client/models/lsp_document_request.rb +290 -0
- data/lib/daytona_api_client/models/lsp_location.rb +261 -0
- data/lib/daytona_api_client/models/lsp_server_request.rb +263 -0
- data/lib/daytona_api_client/models/lsp_symbol.rb +287 -0
- data/lib/daytona_api_client/models/match.rb +287 -0
- data/lib/daytona_api_client/models/mouse_click_request.rb +283 -0
- data/lib/daytona_api_client/models/mouse_click_response.rb +263 -0
- data/lib/daytona_api_client/models/mouse_drag_request.rb +327 -0
- data/lib/daytona_api_client/models/mouse_drag_response.rb +263 -0
- data/lib/daytona_api_client/models/mouse_move_request.rb +263 -0
- data/lib/daytona_api_client/models/mouse_move_response.rb +263 -0
- data/lib/daytona_api_client/models/mouse_position.rb +263 -0
- data/lib/daytona_api_client/models/mouse_scroll_request.rb +300 -0
- data/lib/daytona_api_client/models/mouse_scroll_response.rb +236 -0
- data/lib/daytona_api_client/models/oidc_config.rb +290 -0
- data/lib/daytona_api_client/models/organization.rb +663 -0
- data/lib/daytona_api_client/models/organization_invitation.rb +534 -0
- data/lib/daytona_api_client/models/organization_role.rb +412 -0
- data/lib/daytona_api_client/models/organization_sandbox_default_limited_network_egress.rb +236 -0
- data/lib/daytona_api_client/models/organization_suspension.rb +290 -0
- data/lib/daytona_api_client/models/organization_usage_overview.rb +341 -0
- data/lib/daytona_api_client/models/organization_user.rb +451 -0
- data/lib/daytona_api_client/models/paginated_audit_logs.rb +325 -0
- data/lib/daytona_api_client/models/paginated_sandboxes.rb +315 -0
- data/lib/daytona_api_client/models/paginated_snapshots.rb +315 -0
- data/lib/daytona_api_client/models/paginated_snapshots_dto.rb +315 -0
- data/lib/daytona_api_client/models/port_preview_url.rb +290 -0
- data/lib/daytona_api_client/models/position.rb +261 -0
- data/lib/daytona_api_client/models/posthog_config.rb +263 -0
- data/lib/daytona_api_client/models/process_errors_response.rb +263 -0
- data/lib/daytona_api_client/models/process_logs_response.rb +263 -0
- data/lib/daytona_api_client/models/process_restart_response.rb +263 -0
- data/lib/daytona_api_client/models/process_status_response.rb +263 -0
- data/lib/daytona_api_client/models/project_dir_response.rb +218 -0
- data/lib/daytona_api_client/models/pty_create_request.rb +288 -0
- data/lib/daytona_api_client/models/pty_create_response.rb +236 -0
- data/lib/daytona_api_client/models/pty_list_response.rb +238 -0
- data/lib/daytona_api_client/models/pty_resize_request.rb +263 -0
- data/lib/daytona_api_client/models/pty_session_info.rb +425 -0
- data/lib/daytona_api_client/models/range.rb +261 -0
- data/lib/daytona_api_client/models/rate_limit_config.rb +249 -0
- data/lib/daytona_api_client/models/rate_limit_entry.rb +229 -0
- data/lib/daytona_api_client/models/region.rb +328 -0
- data/lib/daytona_api_client/models/region_quota.rb +339 -0
- data/lib/daytona_api_client/models/region_screenshot_response.rb +256 -0
- data/lib/daytona_api_client/models/region_usage_overview.rb +391 -0
- data/lib/daytona_api_client/models/registry_push_access_dto.rb +371 -0
- data/lib/daytona_api_client/models/replace_request.rb +289 -0
- data/lib/daytona_api_client/models/replace_result.rb +236 -0
- data/lib/daytona_api_client/models/runner.rb +780 -0
- data/lib/daytona_api_client/models/runner_snapshot_dto.rb +290 -0
- data/lib/daytona_api_client/models/runner_state.rb +43 -0
- data/lib/daytona_api_client/models/sandbox.rb +782 -0
- data/lib/daytona_api_client/models/sandbox_class.rb +41 -0
- data/lib/daytona_api_client/models/sandbox_desired_state.rb +43 -0
- data/lib/daytona_api_client/models/sandbox_info.rb +273 -0
- data/lib/daytona_api_client/models/sandbox_labels.rb +238 -0
- data/lib/daytona_api_client/models/sandbox_state.rb +54 -0
- data/lib/daytona_api_client/models/sandbox_volume.rb +273 -0
- data/lib/daytona_api_client/models/screenshot_response.rb +256 -0
- data/lib/daytona_api_client/models/search_files_response.rb +237 -0
- data/lib/daytona_api_client/models/send_webhook_dto.rb +273 -0
- data/lib/daytona_api_client/models/session.rb +251 -0
- data/lib/daytona_api_client/models/session_execute_request.rb +256 -0
- data/lib/daytona_api_client/models/session_execute_response.rb +239 -0
- data/lib/daytona_api_client/models/set_snapshot_general_status_dto.rb +236 -0
- data/lib/daytona_api_client/models/snapshot_dto.rb +569 -0
- data/lib/daytona_api_client/models/snapshot_state.rb +46 -0
- data/lib/daytona_api_client/models/ssh_access_dto.rb +371 -0
- data/lib/daytona_api_client/models/ssh_access_validation_dto.rb +263 -0
- data/lib/daytona_api_client/models/storage_access_dto.rb +371 -0
- data/lib/daytona_api_client/models/update_docker_registry.rb +310 -0
- data/lib/daytona_api_client/models/update_organization_default_region.rb +236 -0
- data/lib/daytona_api_client/models/update_organization_invitation.rb +299 -0
- data/lib/daytona_api_client/models/update_organization_member_access.rb +289 -0
- data/lib/daytona_api_client/models/update_organization_quota.rb +317 -0
- data/lib/daytona_api_client/models/update_organization_region_quota.rb +245 -0
- data/lib/daytona_api_client/models/update_organization_role.rb +304 -0
- data/lib/daytona_api_client/models/update_sandbox_state_dto.rb +270 -0
- data/lib/daytona_api_client/models/user.rb +346 -0
- data/lib/daytona_api_client/models/user_home_dir_response.rb +218 -0
- data/lib/daytona_api_client/models/user_public_key.rb +263 -0
- data/lib/daytona_api_client/models/volume_dto.rb +417 -0
- data/lib/daytona_api_client/models/volume_state.rb +45 -0
- data/lib/daytona_api_client/models/webhook_app_portal_access.rb +236 -0
- data/lib/daytona_api_client/models/webhook_controller_get_status200_response.rb +218 -0
- data/lib/daytona_api_client/models/webhook_initialization_status.rb +343 -0
- data/lib/daytona_api_client/models/windows_response.rb +265 -0
- data/lib/daytona_api_client/models/work_dir_response.rb +218 -0
- data/lib/daytona_api_client/models/workspace.rb +834 -0
- data/lib/daytona_api_client/models/workspace_port_preview_url.rb +263 -0
- data/lib/daytona_api_client/version.rb +15 -0
- data/lib/daytona_api_client.rb +201 -0
- data/project.json +59 -0
- metadata +261 -0
|
@@ -0,0 +1,663 @@
|
|
|
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.12.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module DaytonaApiClient
|
|
17
|
+
class Organization
|
|
18
|
+
# Organization ID
|
|
19
|
+
attr_accessor :id
|
|
20
|
+
|
|
21
|
+
# Organization name
|
|
22
|
+
attr_accessor :name
|
|
23
|
+
|
|
24
|
+
# User ID of the organization creator
|
|
25
|
+
attr_accessor :created_by
|
|
26
|
+
|
|
27
|
+
# Personal organization flag
|
|
28
|
+
attr_accessor :personal
|
|
29
|
+
|
|
30
|
+
# Creation timestamp
|
|
31
|
+
attr_accessor :created_at
|
|
32
|
+
|
|
33
|
+
# Last update timestamp
|
|
34
|
+
attr_accessor :updated_at
|
|
35
|
+
|
|
36
|
+
# Suspended flag
|
|
37
|
+
attr_accessor :suspended
|
|
38
|
+
|
|
39
|
+
# Suspended at
|
|
40
|
+
attr_accessor :suspended_at
|
|
41
|
+
|
|
42
|
+
# Suspended reason
|
|
43
|
+
attr_accessor :suspension_reason
|
|
44
|
+
|
|
45
|
+
# Suspended until
|
|
46
|
+
attr_accessor :suspended_until
|
|
47
|
+
|
|
48
|
+
# Suspension cleanup grace period hours
|
|
49
|
+
attr_accessor :suspension_cleanup_grace_period_hours
|
|
50
|
+
|
|
51
|
+
# Max CPU per sandbox
|
|
52
|
+
attr_accessor :max_cpu_per_sandbox
|
|
53
|
+
|
|
54
|
+
# Max memory per sandbox
|
|
55
|
+
attr_accessor :max_memory_per_sandbox
|
|
56
|
+
|
|
57
|
+
# Max disk per sandbox
|
|
58
|
+
attr_accessor :max_disk_per_sandbox
|
|
59
|
+
|
|
60
|
+
# Sandbox default network block all
|
|
61
|
+
attr_accessor :sandbox_limited_network_egress
|
|
62
|
+
|
|
63
|
+
# Default region ID
|
|
64
|
+
attr_accessor :default_region_id
|
|
65
|
+
|
|
66
|
+
# Authenticated rate limit per minute
|
|
67
|
+
attr_accessor :authenticated_rate_limit
|
|
68
|
+
|
|
69
|
+
# Sandbox create rate limit per minute
|
|
70
|
+
attr_accessor :sandbox_create_rate_limit
|
|
71
|
+
|
|
72
|
+
# Sandbox lifecycle rate limit per minute
|
|
73
|
+
attr_accessor :sandbox_lifecycle_rate_limit
|
|
74
|
+
|
|
75
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
76
|
+
def self.attribute_map
|
|
77
|
+
{
|
|
78
|
+
:'id' => :'id',
|
|
79
|
+
:'name' => :'name',
|
|
80
|
+
:'created_by' => :'createdBy',
|
|
81
|
+
:'personal' => :'personal',
|
|
82
|
+
:'created_at' => :'createdAt',
|
|
83
|
+
:'updated_at' => :'updatedAt',
|
|
84
|
+
:'suspended' => :'suspended',
|
|
85
|
+
:'suspended_at' => :'suspendedAt',
|
|
86
|
+
:'suspension_reason' => :'suspensionReason',
|
|
87
|
+
:'suspended_until' => :'suspendedUntil',
|
|
88
|
+
:'suspension_cleanup_grace_period_hours' => :'suspensionCleanupGracePeriodHours',
|
|
89
|
+
:'max_cpu_per_sandbox' => :'maxCpuPerSandbox',
|
|
90
|
+
:'max_memory_per_sandbox' => :'maxMemoryPerSandbox',
|
|
91
|
+
:'max_disk_per_sandbox' => :'maxDiskPerSandbox',
|
|
92
|
+
:'sandbox_limited_network_egress' => :'sandboxLimitedNetworkEgress',
|
|
93
|
+
:'default_region_id' => :'defaultRegionId',
|
|
94
|
+
:'authenticated_rate_limit' => :'authenticatedRateLimit',
|
|
95
|
+
:'sandbox_create_rate_limit' => :'sandboxCreateRateLimit',
|
|
96
|
+
:'sandbox_lifecycle_rate_limit' => :'sandboxLifecycleRateLimit'
|
|
97
|
+
}
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# Returns attribute mapping this model knows about
|
|
101
|
+
def self.acceptable_attribute_map
|
|
102
|
+
attribute_map
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# Returns all the JSON keys this model knows about
|
|
106
|
+
def self.acceptable_attributes
|
|
107
|
+
acceptable_attribute_map.values
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Attribute type mapping.
|
|
111
|
+
def self.openapi_types
|
|
112
|
+
{
|
|
113
|
+
:'id' => :'String',
|
|
114
|
+
:'name' => :'String',
|
|
115
|
+
:'created_by' => :'String',
|
|
116
|
+
:'personal' => :'Boolean',
|
|
117
|
+
:'created_at' => :'Time',
|
|
118
|
+
:'updated_at' => :'Time',
|
|
119
|
+
:'suspended' => :'Boolean',
|
|
120
|
+
:'suspended_at' => :'Time',
|
|
121
|
+
:'suspension_reason' => :'String',
|
|
122
|
+
:'suspended_until' => :'Time',
|
|
123
|
+
:'suspension_cleanup_grace_period_hours' => :'Float',
|
|
124
|
+
:'max_cpu_per_sandbox' => :'Float',
|
|
125
|
+
:'max_memory_per_sandbox' => :'Float',
|
|
126
|
+
:'max_disk_per_sandbox' => :'Float',
|
|
127
|
+
:'sandbox_limited_network_egress' => :'Boolean',
|
|
128
|
+
:'default_region_id' => :'String',
|
|
129
|
+
:'authenticated_rate_limit' => :'Float',
|
|
130
|
+
:'sandbox_create_rate_limit' => :'Float',
|
|
131
|
+
:'sandbox_lifecycle_rate_limit' => :'Float'
|
|
132
|
+
}
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
# List of attributes with nullable: true
|
|
136
|
+
def self.openapi_nullable
|
|
137
|
+
Set.new([
|
|
138
|
+
:'authenticated_rate_limit',
|
|
139
|
+
:'sandbox_create_rate_limit',
|
|
140
|
+
:'sandbox_lifecycle_rate_limit'
|
|
141
|
+
])
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
# Initializes the object
|
|
145
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
146
|
+
def initialize(attributes = {})
|
|
147
|
+
if (!attributes.is_a?(Hash))
|
|
148
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::Organization` initialize method"
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
152
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
153
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
154
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
155
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::Organization`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
156
|
+
end
|
|
157
|
+
h[k.to_sym] = v
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
if attributes.key?(:'id')
|
|
161
|
+
self.id = attributes[:'id']
|
|
162
|
+
else
|
|
163
|
+
self.id = nil
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
if attributes.key?(:'name')
|
|
167
|
+
self.name = attributes[:'name']
|
|
168
|
+
else
|
|
169
|
+
self.name = nil
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
if attributes.key?(:'created_by')
|
|
173
|
+
self.created_by = attributes[:'created_by']
|
|
174
|
+
else
|
|
175
|
+
self.created_by = nil
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
if attributes.key?(:'personal')
|
|
179
|
+
self.personal = attributes[:'personal']
|
|
180
|
+
else
|
|
181
|
+
self.personal = nil
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
if attributes.key?(:'created_at')
|
|
185
|
+
self.created_at = attributes[:'created_at']
|
|
186
|
+
else
|
|
187
|
+
self.created_at = nil
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
if attributes.key?(:'updated_at')
|
|
191
|
+
self.updated_at = attributes[:'updated_at']
|
|
192
|
+
else
|
|
193
|
+
self.updated_at = nil
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
if attributes.key?(:'suspended')
|
|
197
|
+
self.suspended = attributes[:'suspended']
|
|
198
|
+
else
|
|
199
|
+
self.suspended = nil
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
if attributes.key?(:'suspended_at')
|
|
203
|
+
self.suspended_at = attributes[:'suspended_at']
|
|
204
|
+
else
|
|
205
|
+
self.suspended_at = nil
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
if attributes.key?(:'suspension_reason')
|
|
209
|
+
self.suspension_reason = attributes[:'suspension_reason']
|
|
210
|
+
else
|
|
211
|
+
self.suspension_reason = nil
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
if attributes.key?(:'suspended_until')
|
|
215
|
+
self.suspended_until = attributes[:'suspended_until']
|
|
216
|
+
else
|
|
217
|
+
self.suspended_until = nil
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
if attributes.key?(:'suspension_cleanup_grace_period_hours')
|
|
221
|
+
self.suspension_cleanup_grace_period_hours = attributes[:'suspension_cleanup_grace_period_hours']
|
|
222
|
+
else
|
|
223
|
+
self.suspension_cleanup_grace_period_hours = nil
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
if attributes.key?(:'max_cpu_per_sandbox')
|
|
227
|
+
self.max_cpu_per_sandbox = attributes[:'max_cpu_per_sandbox']
|
|
228
|
+
else
|
|
229
|
+
self.max_cpu_per_sandbox = nil
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
if attributes.key?(:'max_memory_per_sandbox')
|
|
233
|
+
self.max_memory_per_sandbox = attributes[:'max_memory_per_sandbox']
|
|
234
|
+
else
|
|
235
|
+
self.max_memory_per_sandbox = nil
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
if attributes.key?(:'max_disk_per_sandbox')
|
|
239
|
+
self.max_disk_per_sandbox = attributes[:'max_disk_per_sandbox']
|
|
240
|
+
else
|
|
241
|
+
self.max_disk_per_sandbox = nil
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
if attributes.key?(:'sandbox_limited_network_egress')
|
|
245
|
+
self.sandbox_limited_network_egress = attributes[:'sandbox_limited_network_egress']
|
|
246
|
+
else
|
|
247
|
+
self.sandbox_limited_network_egress = nil
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
if attributes.key?(:'default_region_id')
|
|
251
|
+
self.default_region_id = attributes[:'default_region_id']
|
|
252
|
+
end
|
|
253
|
+
|
|
254
|
+
if attributes.key?(:'authenticated_rate_limit')
|
|
255
|
+
self.authenticated_rate_limit = attributes[:'authenticated_rate_limit']
|
|
256
|
+
else
|
|
257
|
+
self.authenticated_rate_limit = nil
|
|
258
|
+
end
|
|
259
|
+
|
|
260
|
+
if attributes.key?(:'sandbox_create_rate_limit')
|
|
261
|
+
self.sandbox_create_rate_limit = attributes[:'sandbox_create_rate_limit']
|
|
262
|
+
else
|
|
263
|
+
self.sandbox_create_rate_limit = nil
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
if attributes.key?(:'sandbox_lifecycle_rate_limit')
|
|
267
|
+
self.sandbox_lifecycle_rate_limit = attributes[:'sandbox_lifecycle_rate_limit']
|
|
268
|
+
else
|
|
269
|
+
self.sandbox_lifecycle_rate_limit = nil
|
|
270
|
+
end
|
|
271
|
+
end
|
|
272
|
+
|
|
273
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
274
|
+
# @return Array for valid properties with the reasons
|
|
275
|
+
def list_invalid_properties
|
|
276
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
277
|
+
invalid_properties = Array.new
|
|
278
|
+
if @id.nil?
|
|
279
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
280
|
+
end
|
|
281
|
+
|
|
282
|
+
if @name.nil?
|
|
283
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
284
|
+
end
|
|
285
|
+
|
|
286
|
+
if @created_by.nil?
|
|
287
|
+
invalid_properties.push('invalid value for "created_by", created_by cannot be nil.')
|
|
288
|
+
end
|
|
289
|
+
|
|
290
|
+
if @personal.nil?
|
|
291
|
+
invalid_properties.push('invalid value for "personal", personal cannot be nil.')
|
|
292
|
+
end
|
|
293
|
+
|
|
294
|
+
if @created_at.nil?
|
|
295
|
+
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
|
296
|
+
end
|
|
297
|
+
|
|
298
|
+
if @updated_at.nil?
|
|
299
|
+
invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
|
|
300
|
+
end
|
|
301
|
+
|
|
302
|
+
if @suspended.nil?
|
|
303
|
+
invalid_properties.push('invalid value for "suspended", suspended cannot be nil.')
|
|
304
|
+
end
|
|
305
|
+
|
|
306
|
+
if @suspended_at.nil?
|
|
307
|
+
invalid_properties.push('invalid value for "suspended_at", suspended_at cannot be nil.')
|
|
308
|
+
end
|
|
309
|
+
|
|
310
|
+
if @suspension_reason.nil?
|
|
311
|
+
invalid_properties.push('invalid value for "suspension_reason", suspension_reason cannot be nil.')
|
|
312
|
+
end
|
|
313
|
+
|
|
314
|
+
if @suspended_until.nil?
|
|
315
|
+
invalid_properties.push('invalid value for "suspended_until", suspended_until cannot be nil.')
|
|
316
|
+
end
|
|
317
|
+
|
|
318
|
+
if @suspension_cleanup_grace_period_hours.nil?
|
|
319
|
+
invalid_properties.push('invalid value for "suspension_cleanup_grace_period_hours", suspension_cleanup_grace_period_hours cannot be nil.')
|
|
320
|
+
end
|
|
321
|
+
|
|
322
|
+
if @max_cpu_per_sandbox.nil?
|
|
323
|
+
invalid_properties.push('invalid value for "max_cpu_per_sandbox", max_cpu_per_sandbox cannot be nil.')
|
|
324
|
+
end
|
|
325
|
+
|
|
326
|
+
if @max_memory_per_sandbox.nil?
|
|
327
|
+
invalid_properties.push('invalid value for "max_memory_per_sandbox", max_memory_per_sandbox cannot be nil.')
|
|
328
|
+
end
|
|
329
|
+
|
|
330
|
+
if @max_disk_per_sandbox.nil?
|
|
331
|
+
invalid_properties.push('invalid value for "max_disk_per_sandbox", max_disk_per_sandbox cannot be nil.')
|
|
332
|
+
end
|
|
333
|
+
|
|
334
|
+
if @sandbox_limited_network_egress.nil?
|
|
335
|
+
invalid_properties.push('invalid value for "sandbox_limited_network_egress", sandbox_limited_network_egress cannot be nil.')
|
|
336
|
+
end
|
|
337
|
+
|
|
338
|
+
invalid_properties
|
|
339
|
+
end
|
|
340
|
+
|
|
341
|
+
# Check to see if the all the properties in the model are valid
|
|
342
|
+
# @return true if the model is valid
|
|
343
|
+
def valid?
|
|
344
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
345
|
+
return false if @id.nil?
|
|
346
|
+
return false if @name.nil?
|
|
347
|
+
return false if @created_by.nil?
|
|
348
|
+
return false if @personal.nil?
|
|
349
|
+
return false if @created_at.nil?
|
|
350
|
+
return false if @updated_at.nil?
|
|
351
|
+
return false if @suspended.nil?
|
|
352
|
+
return false if @suspended_at.nil?
|
|
353
|
+
return false if @suspension_reason.nil?
|
|
354
|
+
return false if @suspended_until.nil?
|
|
355
|
+
return false if @suspension_cleanup_grace_period_hours.nil?
|
|
356
|
+
return false if @max_cpu_per_sandbox.nil?
|
|
357
|
+
return false if @max_memory_per_sandbox.nil?
|
|
358
|
+
return false if @max_disk_per_sandbox.nil?
|
|
359
|
+
return false if @sandbox_limited_network_egress.nil?
|
|
360
|
+
true
|
|
361
|
+
end
|
|
362
|
+
|
|
363
|
+
# Custom attribute writer method with validation
|
|
364
|
+
# @param [Object] id Value to be assigned
|
|
365
|
+
def id=(id)
|
|
366
|
+
if id.nil?
|
|
367
|
+
fail ArgumentError, 'id cannot be nil'
|
|
368
|
+
end
|
|
369
|
+
|
|
370
|
+
@id = id
|
|
371
|
+
end
|
|
372
|
+
|
|
373
|
+
# Custom attribute writer method with validation
|
|
374
|
+
# @param [Object] name Value to be assigned
|
|
375
|
+
def name=(name)
|
|
376
|
+
if name.nil?
|
|
377
|
+
fail ArgumentError, 'name cannot be nil'
|
|
378
|
+
end
|
|
379
|
+
|
|
380
|
+
@name = name
|
|
381
|
+
end
|
|
382
|
+
|
|
383
|
+
# Custom attribute writer method with validation
|
|
384
|
+
# @param [Object] created_by Value to be assigned
|
|
385
|
+
def created_by=(created_by)
|
|
386
|
+
if created_by.nil?
|
|
387
|
+
fail ArgumentError, 'created_by cannot be nil'
|
|
388
|
+
end
|
|
389
|
+
|
|
390
|
+
@created_by = created_by
|
|
391
|
+
end
|
|
392
|
+
|
|
393
|
+
# Custom attribute writer method with validation
|
|
394
|
+
# @param [Object] personal Value to be assigned
|
|
395
|
+
def personal=(personal)
|
|
396
|
+
if personal.nil?
|
|
397
|
+
fail ArgumentError, 'personal cannot be nil'
|
|
398
|
+
end
|
|
399
|
+
|
|
400
|
+
@personal = personal
|
|
401
|
+
end
|
|
402
|
+
|
|
403
|
+
# Custom attribute writer method with validation
|
|
404
|
+
# @param [Object] created_at Value to be assigned
|
|
405
|
+
def created_at=(created_at)
|
|
406
|
+
if created_at.nil?
|
|
407
|
+
fail ArgumentError, 'created_at cannot be nil'
|
|
408
|
+
end
|
|
409
|
+
|
|
410
|
+
@created_at = created_at
|
|
411
|
+
end
|
|
412
|
+
|
|
413
|
+
# Custom attribute writer method with validation
|
|
414
|
+
# @param [Object] updated_at Value to be assigned
|
|
415
|
+
def updated_at=(updated_at)
|
|
416
|
+
if updated_at.nil?
|
|
417
|
+
fail ArgumentError, 'updated_at cannot be nil'
|
|
418
|
+
end
|
|
419
|
+
|
|
420
|
+
@updated_at = updated_at
|
|
421
|
+
end
|
|
422
|
+
|
|
423
|
+
# Custom attribute writer method with validation
|
|
424
|
+
# @param [Object] suspended Value to be assigned
|
|
425
|
+
def suspended=(suspended)
|
|
426
|
+
if suspended.nil?
|
|
427
|
+
fail ArgumentError, 'suspended cannot be nil'
|
|
428
|
+
end
|
|
429
|
+
|
|
430
|
+
@suspended = suspended
|
|
431
|
+
end
|
|
432
|
+
|
|
433
|
+
# Custom attribute writer method with validation
|
|
434
|
+
# @param [Object] suspended_at Value to be assigned
|
|
435
|
+
def suspended_at=(suspended_at)
|
|
436
|
+
if suspended_at.nil?
|
|
437
|
+
fail ArgumentError, 'suspended_at cannot be nil'
|
|
438
|
+
end
|
|
439
|
+
|
|
440
|
+
@suspended_at = suspended_at
|
|
441
|
+
end
|
|
442
|
+
|
|
443
|
+
# Custom attribute writer method with validation
|
|
444
|
+
# @param [Object] suspension_reason Value to be assigned
|
|
445
|
+
def suspension_reason=(suspension_reason)
|
|
446
|
+
if suspension_reason.nil?
|
|
447
|
+
fail ArgumentError, 'suspension_reason cannot be nil'
|
|
448
|
+
end
|
|
449
|
+
|
|
450
|
+
@suspension_reason = suspension_reason
|
|
451
|
+
end
|
|
452
|
+
|
|
453
|
+
# Custom attribute writer method with validation
|
|
454
|
+
# @param [Object] suspended_until Value to be assigned
|
|
455
|
+
def suspended_until=(suspended_until)
|
|
456
|
+
if suspended_until.nil?
|
|
457
|
+
fail ArgumentError, 'suspended_until cannot be nil'
|
|
458
|
+
end
|
|
459
|
+
|
|
460
|
+
@suspended_until = suspended_until
|
|
461
|
+
end
|
|
462
|
+
|
|
463
|
+
# Custom attribute writer method with validation
|
|
464
|
+
# @param [Object] suspension_cleanup_grace_period_hours Value to be assigned
|
|
465
|
+
def suspension_cleanup_grace_period_hours=(suspension_cleanup_grace_period_hours)
|
|
466
|
+
if suspension_cleanup_grace_period_hours.nil?
|
|
467
|
+
fail ArgumentError, 'suspension_cleanup_grace_period_hours cannot be nil'
|
|
468
|
+
end
|
|
469
|
+
|
|
470
|
+
@suspension_cleanup_grace_period_hours = suspension_cleanup_grace_period_hours
|
|
471
|
+
end
|
|
472
|
+
|
|
473
|
+
# Custom attribute writer method with validation
|
|
474
|
+
# @param [Object] max_cpu_per_sandbox Value to be assigned
|
|
475
|
+
def max_cpu_per_sandbox=(max_cpu_per_sandbox)
|
|
476
|
+
if max_cpu_per_sandbox.nil?
|
|
477
|
+
fail ArgumentError, 'max_cpu_per_sandbox cannot be nil'
|
|
478
|
+
end
|
|
479
|
+
|
|
480
|
+
@max_cpu_per_sandbox = max_cpu_per_sandbox
|
|
481
|
+
end
|
|
482
|
+
|
|
483
|
+
# Custom attribute writer method with validation
|
|
484
|
+
# @param [Object] max_memory_per_sandbox Value to be assigned
|
|
485
|
+
def max_memory_per_sandbox=(max_memory_per_sandbox)
|
|
486
|
+
if max_memory_per_sandbox.nil?
|
|
487
|
+
fail ArgumentError, 'max_memory_per_sandbox cannot be nil'
|
|
488
|
+
end
|
|
489
|
+
|
|
490
|
+
@max_memory_per_sandbox = max_memory_per_sandbox
|
|
491
|
+
end
|
|
492
|
+
|
|
493
|
+
# Custom attribute writer method with validation
|
|
494
|
+
# @param [Object] max_disk_per_sandbox Value to be assigned
|
|
495
|
+
def max_disk_per_sandbox=(max_disk_per_sandbox)
|
|
496
|
+
if max_disk_per_sandbox.nil?
|
|
497
|
+
fail ArgumentError, 'max_disk_per_sandbox cannot be nil'
|
|
498
|
+
end
|
|
499
|
+
|
|
500
|
+
@max_disk_per_sandbox = max_disk_per_sandbox
|
|
501
|
+
end
|
|
502
|
+
|
|
503
|
+
# Custom attribute writer method with validation
|
|
504
|
+
# @param [Object] sandbox_limited_network_egress Value to be assigned
|
|
505
|
+
def sandbox_limited_network_egress=(sandbox_limited_network_egress)
|
|
506
|
+
if sandbox_limited_network_egress.nil?
|
|
507
|
+
fail ArgumentError, 'sandbox_limited_network_egress cannot be nil'
|
|
508
|
+
end
|
|
509
|
+
|
|
510
|
+
@sandbox_limited_network_egress = sandbox_limited_network_egress
|
|
511
|
+
end
|
|
512
|
+
|
|
513
|
+
# Checks equality by comparing each attribute.
|
|
514
|
+
# @param [Object] Object to be compared
|
|
515
|
+
def ==(o)
|
|
516
|
+
return true if self.equal?(o)
|
|
517
|
+
self.class == o.class &&
|
|
518
|
+
id == o.id &&
|
|
519
|
+
name == o.name &&
|
|
520
|
+
created_by == o.created_by &&
|
|
521
|
+
personal == o.personal &&
|
|
522
|
+
created_at == o.created_at &&
|
|
523
|
+
updated_at == o.updated_at &&
|
|
524
|
+
suspended == o.suspended &&
|
|
525
|
+
suspended_at == o.suspended_at &&
|
|
526
|
+
suspension_reason == o.suspension_reason &&
|
|
527
|
+
suspended_until == o.suspended_until &&
|
|
528
|
+
suspension_cleanup_grace_period_hours == o.suspension_cleanup_grace_period_hours &&
|
|
529
|
+
max_cpu_per_sandbox == o.max_cpu_per_sandbox &&
|
|
530
|
+
max_memory_per_sandbox == o.max_memory_per_sandbox &&
|
|
531
|
+
max_disk_per_sandbox == o.max_disk_per_sandbox &&
|
|
532
|
+
sandbox_limited_network_egress == o.sandbox_limited_network_egress &&
|
|
533
|
+
default_region_id == o.default_region_id &&
|
|
534
|
+
authenticated_rate_limit == o.authenticated_rate_limit &&
|
|
535
|
+
sandbox_create_rate_limit == o.sandbox_create_rate_limit &&
|
|
536
|
+
sandbox_lifecycle_rate_limit == o.sandbox_lifecycle_rate_limit
|
|
537
|
+
end
|
|
538
|
+
|
|
539
|
+
# @see the `==` method
|
|
540
|
+
# @param [Object] Object to be compared
|
|
541
|
+
def eql?(o)
|
|
542
|
+
self == o
|
|
543
|
+
end
|
|
544
|
+
|
|
545
|
+
# Calculates hash code according to all attributes.
|
|
546
|
+
# @return [Integer] Hash code
|
|
547
|
+
def hash
|
|
548
|
+
[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, sandbox_limited_network_egress, default_region_id, authenticated_rate_limit, sandbox_create_rate_limit, sandbox_lifecycle_rate_limit].hash
|
|
549
|
+
end
|
|
550
|
+
|
|
551
|
+
# Builds the object from hash
|
|
552
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
553
|
+
# @return [Object] Returns the model itself
|
|
554
|
+
def self.build_from_hash(attributes)
|
|
555
|
+
return nil unless attributes.is_a?(Hash)
|
|
556
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
557
|
+
transformed_hash = {}
|
|
558
|
+
openapi_types.each_pair do |key, type|
|
|
559
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
560
|
+
transformed_hash["#{key}"] = nil
|
|
561
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
562
|
+
# check to ensure the input is an array given that the attribute
|
|
563
|
+
# is documented as an array but the input is not
|
|
564
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
565
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
566
|
+
end
|
|
567
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
568
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
569
|
+
end
|
|
570
|
+
end
|
|
571
|
+
new(transformed_hash)
|
|
572
|
+
end
|
|
573
|
+
|
|
574
|
+
# Deserializes the data based on type
|
|
575
|
+
# @param string type Data type
|
|
576
|
+
# @param string value Value to be deserialized
|
|
577
|
+
# @return [Object] Deserialized data
|
|
578
|
+
def self._deserialize(type, value)
|
|
579
|
+
case type.to_sym
|
|
580
|
+
when :Time
|
|
581
|
+
Time.parse(value)
|
|
582
|
+
when :Date
|
|
583
|
+
Date.parse(value)
|
|
584
|
+
when :String
|
|
585
|
+
value.to_s
|
|
586
|
+
when :Integer
|
|
587
|
+
value.to_i
|
|
588
|
+
when :Float
|
|
589
|
+
value.to_f
|
|
590
|
+
when :Boolean
|
|
591
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
592
|
+
true
|
|
593
|
+
else
|
|
594
|
+
false
|
|
595
|
+
end
|
|
596
|
+
when :Object
|
|
597
|
+
# generic object (usually a Hash), return directly
|
|
598
|
+
value
|
|
599
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
600
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
601
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
602
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
603
|
+
k_type = Regexp.last_match[:k_type]
|
|
604
|
+
v_type = Regexp.last_match[:v_type]
|
|
605
|
+
{}.tap do |hash|
|
|
606
|
+
value.each do |k, v|
|
|
607
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
608
|
+
end
|
|
609
|
+
end
|
|
610
|
+
else # model
|
|
611
|
+
# models (e.g. Pet) or oneOf
|
|
612
|
+
klass = DaytonaApiClient.const_get(type)
|
|
613
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
614
|
+
end
|
|
615
|
+
end
|
|
616
|
+
|
|
617
|
+
# Returns the string representation of the object
|
|
618
|
+
# @return [String] String presentation of the object
|
|
619
|
+
def to_s
|
|
620
|
+
to_hash.to_s
|
|
621
|
+
end
|
|
622
|
+
|
|
623
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
624
|
+
# @return [Hash] Returns the object in the form of hash
|
|
625
|
+
def to_body
|
|
626
|
+
to_hash
|
|
627
|
+
end
|
|
628
|
+
|
|
629
|
+
# Returns the object in the form of hash
|
|
630
|
+
# @return [Hash] Returns the object in the form of hash
|
|
631
|
+
def to_hash
|
|
632
|
+
hash = {}
|
|
633
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
634
|
+
value = self.send(attr)
|
|
635
|
+
if value.nil?
|
|
636
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
637
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
638
|
+
end
|
|
639
|
+
|
|
640
|
+
hash[param] = _to_hash(value)
|
|
641
|
+
end
|
|
642
|
+
hash
|
|
643
|
+
end
|
|
644
|
+
|
|
645
|
+
# Outputs non-array value in the form of hash
|
|
646
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
647
|
+
# @param [Object] value Any valid value
|
|
648
|
+
# @return [Hash] Returns the value in the form of hash
|
|
649
|
+
def _to_hash(value)
|
|
650
|
+
if value.is_a?(Array)
|
|
651
|
+
value.compact.map { |v| _to_hash(v) }
|
|
652
|
+
elsif value.is_a?(Hash)
|
|
653
|
+
{}.tap do |hash|
|
|
654
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
655
|
+
end
|
|
656
|
+
elsif value.respond_to? :to_hash
|
|
657
|
+
value.to_hash
|
|
658
|
+
else
|
|
659
|
+
value
|
|
660
|
+
end
|
|
661
|
+
end
|
|
662
|
+
end
|
|
663
|
+
end
|