daytona_api_client 1.0.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.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/Gemfile.lock +101 -0
- data/Rakefile +10 -0
- data/daytona_api_client.gemspec +39 -0
- data/lib/daytona_api_client/api/api_keys_api.rb +401 -0
- data/lib/daytona_api_client/api/audit_api.rb +240 -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 +1695 -0
- data/lib/daytona_api_client/api/preview_api.rb +209 -0
- data/lib/daytona_api_client/api/runners_api.rb +321 -0
- data/lib/daytona_api_client/api/sandbox_api.rb +1573 -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 +236 -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 +429 -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 +331 -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 +531 -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 +695 -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 +469 -0
- data/lib/daytona_api_client/models/organization_user.rb +451 -0
- data/lib/daytona_api_client/models/paginated_audit_logs.rb +315 -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 +273 -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/region.rb +236 -0
- data/lib/daytona_api_client/models/region_screenshot_response.rb +256 -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 +755 -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 +263 -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 +49 -0
- data/lib/daytona_api_client/models/ssh_access_dto.rb +371 -0
- data/lib/daytona_api_client/models/ssh_access_validation_dto.rb +283 -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_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_role.rb +304 -0
- data/lib/daytona_api_client/models/update_sandbox_state_dto.rb +260 -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/version.rb +15 -0
- data/lib/daytona_api_client.rb +194 -0
- data/project.json +37 -0
- metadata +246 -0
|
@@ -0,0 +1,534 @@
|
|
|
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 OrganizationInvitation
|
|
18
|
+
# Invitation ID
|
|
19
|
+
attr_accessor :id
|
|
20
|
+
|
|
21
|
+
# Email address of the invitee
|
|
22
|
+
attr_accessor :email
|
|
23
|
+
|
|
24
|
+
# Email address of the inviter
|
|
25
|
+
attr_accessor :invited_by
|
|
26
|
+
|
|
27
|
+
# Organization ID
|
|
28
|
+
attr_accessor :organization_id
|
|
29
|
+
|
|
30
|
+
# Organization name
|
|
31
|
+
attr_accessor :organization_name
|
|
32
|
+
|
|
33
|
+
# Expiration date of the invitation
|
|
34
|
+
attr_accessor :expires_at
|
|
35
|
+
|
|
36
|
+
# Invitation status
|
|
37
|
+
attr_accessor :status
|
|
38
|
+
|
|
39
|
+
# Member role
|
|
40
|
+
attr_accessor :role
|
|
41
|
+
|
|
42
|
+
# Assigned roles
|
|
43
|
+
attr_accessor :assigned_roles
|
|
44
|
+
|
|
45
|
+
# Creation timestamp
|
|
46
|
+
attr_accessor :created_at
|
|
47
|
+
|
|
48
|
+
# Last update timestamp
|
|
49
|
+
attr_accessor :updated_at
|
|
50
|
+
|
|
51
|
+
class EnumAttributeValidator
|
|
52
|
+
attr_reader :datatype
|
|
53
|
+
attr_reader :allowable_values
|
|
54
|
+
|
|
55
|
+
def initialize(datatype, allowable_values)
|
|
56
|
+
@allowable_values = allowable_values.map do |value|
|
|
57
|
+
case datatype.to_s
|
|
58
|
+
when /Integer/i
|
|
59
|
+
value.to_i
|
|
60
|
+
when /Float/i
|
|
61
|
+
value.to_f
|
|
62
|
+
else
|
|
63
|
+
value
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
def valid?(value)
|
|
69
|
+
!value || allowable_values.include?(value)
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
74
|
+
def self.attribute_map
|
|
75
|
+
{
|
|
76
|
+
:'id' => :'id',
|
|
77
|
+
:'email' => :'email',
|
|
78
|
+
:'invited_by' => :'invitedBy',
|
|
79
|
+
:'organization_id' => :'organizationId',
|
|
80
|
+
:'organization_name' => :'organizationName',
|
|
81
|
+
:'expires_at' => :'expiresAt',
|
|
82
|
+
:'status' => :'status',
|
|
83
|
+
:'role' => :'role',
|
|
84
|
+
:'assigned_roles' => :'assignedRoles',
|
|
85
|
+
:'created_at' => :'createdAt',
|
|
86
|
+
:'updated_at' => :'updatedAt'
|
|
87
|
+
}
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# Returns attribute mapping this model knows about
|
|
91
|
+
def self.acceptable_attribute_map
|
|
92
|
+
attribute_map
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Returns all the JSON keys this model knows about
|
|
96
|
+
def self.acceptable_attributes
|
|
97
|
+
acceptable_attribute_map.values
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# Attribute type mapping.
|
|
101
|
+
def self.openapi_types
|
|
102
|
+
{
|
|
103
|
+
:'id' => :'String',
|
|
104
|
+
:'email' => :'String',
|
|
105
|
+
:'invited_by' => :'String',
|
|
106
|
+
:'organization_id' => :'String',
|
|
107
|
+
:'organization_name' => :'String',
|
|
108
|
+
:'expires_at' => :'Time',
|
|
109
|
+
:'status' => :'String',
|
|
110
|
+
:'role' => :'String',
|
|
111
|
+
:'assigned_roles' => :'Array<OrganizationRole>',
|
|
112
|
+
:'created_at' => :'Time',
|
|
113
|
+
:'updated_at' => :'Time'
|
|
114
|
+
}
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# List of attributes with nullable: true
|
|
118
|
+
def self.openapi_nullable
|
|
119
|
+
Set.new([
|
|
120
|
+
])
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# Initializes the object
|
|
124
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
125
|
+
def initialize(attributes = {})
|
|
126
|
+
if (!attributes.is_a?(Hash))
|
|
127
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::OrganizationInvitation` initialize method"
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
131
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
132
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
133
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
134
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::OrganizationInvitation`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
135
|
+
end
|
|
136
|
+
h[k.to_sym] = v
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
if attributes.key?(:'id')
|
|
140
|
+
self.id = attributes[:'id']
|
|
141
|
+
else
|
|
142
|
+
self.id = nil
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
if attributes.key?(:'email')
|
|
146
|
+
self.email = attributes[:'email']
|
|
147
|
+
else
|
|
148
|
+
self.email = nil
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
if attributes.key?(:'invited_by')
|
|
152
|
+
self.invited_by = attributes[:'invited_by']
|
|
153
|
+
else
|
|
154
|
+
self.invited_by = nil
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
if attributes.key?(:'organization_id')
|
|
158
|
+
self.organization_id = attributes[:'organization_id']
|
|
159
|
+
else
|
|
160
|
+
self.organization_id = nil
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
if attributes.key?(:'organization_name')
|
|
164
|
+
self.organization_name = attributes[:'organization_name']
|
|
165
|
+
else
|
|
166
|
+
self.organization_name = nil
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
if attributes.key?(:'expires_at')
|
|
170
|
+
self.expires_at = attributes[:'expires_at']
|
|
171
|
+
else
|
|
172
|
+
self.expires_at = nil
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
if attributes.key?(:'status')
|
|
176
|
+
self.status = attributes[:'status']
|
|
177
|
+
else
|
|
178
|
+
self.status = nil
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
if attributes.key?(:'role')
|
|
182
|
+
self.role = attributes[:'role']
|
|
183
|
+
else
|
|
184
|
+
self.role = nil
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
if attributes.key?(:'assigned_roles')
|
|
188
|
+
if (value = attributes[:'assigned_roles']).is_a?(Array)
|
|
189
|
+
self.assigned_roles = value
|
|
190
|
+
end
|
|
191
|
+
else
|
|
192
|
+
self.assigned_roles = nil
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
if attributes.key?(:'created_at')
|
|
196
|
+
self.created_at = attributes[:'created_at']
|
|
197
|
+
else
|
|
198
|
+
self.created_at = nil
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
if attributes.key?(:'updated_at')
|
|
202
|
+
self.updated_at = attributes[:'updated_at']
|
|
203
|
+
else
|
|
204
|
+
self.updated_at = nil
|
|
205
|
+
end
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
209
|
+
# @return Array for valid properties with the reasons
|
|
210
|
+
def list_invalid_properties
|
|
211
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
212
|
+
invalid_properties = Array.new
|
|
213
|
+
if @id.nil?
|
|
214
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
if @email.nil?
|
|
218
|
+
invalid_properties.push('invalid value for "email", email cannot be nil.')
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
if @invited_by.nil?
|
|
222
|
+
invalid_properties.push('invalid value for "invited_by", invited_by cannot be nil.')
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
if @organization_id.nil?
|
|
226
|
+
invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.')
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
if @organization_name.nil?
|
|
230
|
+
invalid_properties.push('invalid value for "organization_name", organization_name cannot be nil.')
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
if @expires_at.nil?
|
|
234
|
+
invalid_properties.push('invalid value for "expires_at", expires_at cannot be nil.')
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
if @status.nil?
|
|
238
|
+
invalid_properties.push('invalid value for "status", status cannot be nil.')
|
|
239
|
+
end
|
|
240
|
+
|
|
241
|
+
if @role.nil?
|
|
242
|
+
invalid_properties.push('invalid value for "role", role cannot be nil.')
|
|
243
|
+
end
|
|
244
|
+
|
|
245
|
+
if @assigned_roles.nil?
|
|
246
|
+
invalid_properties.push('invalid value for "assigned_roles", assigned_roles cannot be nil.')
|
|
247
|
+
end
|
|
248
|
+
|
|
249
|
+
if @created_at.nil?
|
|
250
|
+
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
if @updated_at.nil?
|
|
254
|
+
invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
|
|
255
|
+
end
|
|
256
|
+
|
|
257
|
+
invalid_properties
|
|
258
|
+
end
|
|
259
|
+
|
|
260
|
+
# Check to see if the all the properties in the model are valid
|
|
261
|
+
# @return true if the model is valid
|
|
262
|
+
def valid?
|
|
263
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
264
|
+
return false if @id.nil?
|
|
265
|
+
return false if @email.nil?
|
|
266
|
+
return false if @invited_by.nil?
|
|
267
|
+
return false if @organization_id.nil?
|
|
268
|
+
return false if @organization_name.nil?
|
|
269
|
+
return false if @expires_at.nil?
|
|
270
|
+
return false if @status.nil?
|
|
271
|
+
status_validator = EnumAttributeValidator.new('String', ["pending", "accepted", "declined", "cancelled"])
|
|
272
|
+
return false unless status_validator.valid?(@status)
|
|
273
|
+
return false if @role.nil?
|
|
274
|
+
role_validator = EnumAttributeValidator.new('String', ["owner", "member"])
|
|
275
|
+
return false unless role_validator.valid?(@role)
|
|
276
|
+
return false if @assigned_roles.nil?
|
|
277
|
+
return false if @created_at.nil?
|
|
278
|
+
return false if @updated_at.nil?
|
|
279
|
+
true
|
|
280
|
+
end
|
|
281
|
+
|
|
282
|
+
# Custom attribute writer method with validation
|
|
283
|
+
# @param [Object] id Value to be assigned
|
|
284
|
+
def id=(id)
|
|
285
|
+
if id.nil?
|
|
286
|
+
fail ArgumentError, 'id cannot be nil'
|
|
287
|
+
end
|
|
288
|
+
|
|
289
|
+
@id = id
|
|
290
|
+
end
|
|
291
|
+
|
|
292
|
+
# Custom attribute writer method with validation
|
|
293
|
+
# @param [Object] email Value to be assigned
|
|
294
|
+
def email=(email)
|
|
295
|
+
if email.nil?
|
|
296
|
+
fail ArgumentError, 'email cannot be nil'
|
|
297
|
+
end
|
|
298
|
+
|
|
299
|
+
@email = email
|
|
300
|
+
end
|
|
301
|
+
|
|
302
|
+
# Custom attribute writer method with validation
|
|
303
|
+
# @param [Object] invited_by Value to be assigned
|
|
304
|
+
def invited_by=(invited_by)
|
|
305
|
+
if invited_by.nil?
|
|
306
|
+
fail ArgumentError, 'invited_by cannot be nil'
|
|
307
|
+
end
|
|
308
|
+
|
|
309
|
+
@invited_by = invited_by
|
|
310
|
+
end
|
|
311
|
+
|
|
312
|
+
# Custom attribute writer method with validation
|
|
313
|
+
# @param [Object] organization_id Value to be assigned
|
|
314
|
+
def organization_id=(organization_id)
|
|
315
|
+
if organization_id.nil?
|
|
316
|
+
fail ArgumentError, 'organization_id cannot be nil'
|
|
317
|
+
end
|
|
318
|
+
|
|
319
|
+
@organization_id = organization_id
|
|
320
|
+
end
|
|
321
|
+
|
|
322
|
+
# Custom attribute writer method with validation
|
|
323
|
+
# @param [Object] organization_name Value to be assigned
|
|
324
|
+
def organization_name=(organization_name)
|
|
325
|
+
if organization_name.nil?
|
|
326
|
+
fail ArgumentError, 'organization_name cannot be nil'
|
|
327
|
+
end
|
|
328
|
+
|
|
329
|
+
@organization_name = organization_name
|
|
330
|
+
end
|
|
331
|
+
|
|
332
|
+
# Custom attribute writer method with validation
|
|
333
|
+
# @param [Object] expires_at Value to be assigned
|
|
334
|
+
def expires_at=(expires_at)
|
|
335
|
+
if expires_at.nil?
|
|
336
|
+
fail ArgumentError, 'expires_at cannot be nil'
|
|
337
|
+
end
|
|
338
|
+
|
|
339
|
+
@expires_at = expires_at
|
|
340
|
+
end
|
|
341
|
+
|
|
342
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
343
|
+
# @param [Object] status Object to be assigned
|
|
344
|
+
def status=(status)
|
|
345
|
+
validator = EnumAttributeValidator.new('String', ["pending", "accepted", "declined", "cancelled"])
|
|
346
|
+
unless validator.valid?(status)
|
|
347
|
+
fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
|
|
348
|
+
end
|
|
349
|
+
@status = status
|
|
350
|
+
end
|
|
351
|
+
|
|
352
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
353
|
+
# @param [Object] role Object to be assigned
|
|
354
|
+
def role=(role)
|
|
355
|
+
validator = EnumAttributeValidator.new('String', ["owner", "member"])
|
|
356
|
+
unless validator.valid?(role)
|
|
357
|
+
fail ArgumentError, "invalid value for \"role\", must be one of #{validator.allowable_values}."
|
|
358
|
+
end
|
|
359
|
+
@role = role
|
|
360
|
+
end
|
|
361
|
+
|
|
362
|
+
# Custom attribute writer method with validation
|
|
363
|
+
# @param [Object] assigned_roles Value to be assigned
|
|
364
|
+
def assigned_roles=(assigned_roles)
|
|
365
|
+
if assigned_roles.nil?
|
|
366
|
+
fail ArgumentError, 'assigned_roles cannot be nil'
|
|
367
|
+
end
|
|
368
|
+
|
|
369
|
+
@assigned_roles = assigned_roles
|
|
370
|
+
end
|
|
371
|
+
|
|
372
|
+
# Custom attribute writer method with validation
|
|
373
|
+
# @param [Object] created_at Value to be assigned
|
|
374
|
+
def created_at=(created_at)
|
|
375
|
+
if created_at.nil?
|
|
376
|
+
fail ArgumentError, 'created_at cannot be nil'
|
|
377
|
+
end
|
|
378
|
+
|
|
379
|
+
@created_at = created_at
|
|
380
|
+
end
|
|
381
|
+
|
|
382
|
+
# Custom attribute writer method with validation
|
|
383
|
+
# @param [Object] updated_at Value to be assigned
|
|
384
|
+
def updated_at=(updated_at)
|
|
385
|
+
if updated_at.nil?
|
|
386
|
+
fail ArgumentError, 'updated_at cannot be nil'
|
|
387
|
+
end
|
|
388
|
+
|
|
389
|
+
@updated_at = updated_at
|
|
390
|
+
end
|
|
391
|
+
|
|
392
|
+
# Checks equality by comparing each attribute.
|
|
393
|
+
# @param [Object] Object to be compared
|
|
394
|
+
def ==(o)
|
|
395
|
+
return true if self.equal?(o)
|
|
396
|
+
self.class == o.class &&
|
|
397
|
+
id == o.id &&
|
|
398
|
+
email == o.email &&
|
|
399
|
+
invited_by == o.invited_by &&
|
|
400
|
+
organization_id == o.organization_id &&
|
|
401
|
+
organization_name == o.organization_name &&
|
|
402
|
+
expires_at == o.expires_at &&
|
|
403
|
+
status == o.status &&
|
|
404
|
+
role == o.role &&
|
|
405
|
+
assigned_roles == o.assigned_roles &&
|
|
406
|
+
created_at == o.created_at &&
|
|
407
|
+
updated_at == o.updated_at
|
|
408
|
+
end
|
|
409
|
+
|
|
410
|
+
# @see the `==` method
|
|
411
|
+
# @param [Object] Object to be compared
|
|
412
|
+
def eql?(o)
|
|
413
|
+
self == o
|
|
414
|
+
end
|
|
415
|
+
|
|
416
|
+
# Calculates hash code according to all attributes.
|
|
417
|
+
# @return [Integer] Hash code
|
|
418
|
+
def hash
|
|
419
|
+
[id, email, invited_by, organization_id, organization_name, expires_at, status, role, assigned_roles, created_at, updated_at].hash
|
|
420
|
+
end
|
|
421
|
+
|
|
422
|
+
# Builds the object from hash
|
|
423
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
424
|
+
# @return [Object] Returns the model itself
|
|
425
|
+
def self.build_from_hash(attributes)
|
|
426
|
+
return nil unless attributes.is_a?(Hash)
|
|
427
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
428
|
+
transformed_hash = {}
|
|
429
|
+
openapi_types.each_pair do |key, type|
|
|
430
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
431
|
+
transformed_hash["#{key}"] = nil
|
|
432
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
433
|
+
# check to ensure the input is an array given that the attribute
|
|
434
|
+
# is documented as an array but the input is not
|
|
435
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
436
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
437
|
+
end
|
|
438
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
439
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
440
|
+
end
|
|
441
|
+
end
|
|
442
|
+
new(transformed_hash)
|
|
443
|
+
end
|
|
444
|
+
|
|
445
|
+
# Deserializes the data based on type
|
|
446
|
+
# @param string type Data type
|
|
447
|
+
# @param string value Value to be deserialized
|
|
448
|
+
# @return [Object] Deserialized data
|
|
449
|
+
def self._deserialize(type, value)
|
|
450
|
+
case type.to_sym
|
|
451
|
+
when :Time
|
|
452
|
+
Time.parse(value)
|
|
453
|
+
when :Date
|
|
454
|
+
Date.parse(value)
|
|
455
|
+
when :String
|
|
456
|
+
value.to_s
|
|
457
|
+
when :Integer
|
|
458
|
+
value.to_i
|
|
459
|
+
when :Float
|
|
460
|
+
value.to_f
|
|
461
|
+
when :Boolean
|
|
462
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
463
|
+
true
|
|
464
|
+
else
|
|
465
|
+
false
|
|
466
|
+
end
|
|
467
|
+
when :Object
|
|
468
|
+
# generic object (usually a Hash), return directly
|
|
469
|
+
value
|
|
470
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
471
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
472
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
473
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
474
|
+
k_type = Regexp.last_match[:k_type]
|
|
475
|
+
v_type = Regexp.last_match[:v_type]
|
|
476
|
+
{}.tap do |hash|
|
|
477
|
+
value.each do |k, v|
|
|
478
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
479
|
+
end
|
|
480
|
+
end
|
|
481
|
+
else # model
|
|
482
|
+
# models (e.g. Pet) or oneOf
|
|
483
|
+
klass = DaytonaApiClient.const_get(type)
|
|
484
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
485
|
+
end
|
|
486
|
+
end
|
|
487
|
+
|
|
488
|
+
# Returns the string representation of the object
|
|
489
|
+
# @return [String] String presentation of the object
|
|
490
|
+
def to_s
|
|
491
|
+
to_hash.to_s
|
|
492
|
+
end
|
|
493
|
+
|
|
494
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
495
|
+
# @return [Hash] Returns the object in the form of hash
|
|
496
|
+
def to_body
|
|
497
|
+
to_hash
|
|
498
|
+
end
|
|
499
|
+
|
|
500
|
+
# Returns the object in the form of hash
|
|
501
|
+
# @return [Hash] Returns the object in the form of hash
|
|
502
|
+
def to_hash
|
|
503
|
+
hash = {}
|
|
504
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
505
|
+
value = self.send(attr)
|
|
506
|
+
if value.nil?
|
|
507
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
508
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
509
|
+
end
|
|
510
|
+
|
|
511
|
+
hash[param] = _to_hash(value)
|
|
512
|
+
end
|
|
513
|
+
hash
|
|
514
|
+
end
|
|
515
|
+
|
|
516
|
+
# Outputs non-array value in the form of hash
|
|
517
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
518
|
+
# @param [Object] value Any valid value
|
|
519
|
+
# @return [Hash] Returns the value in the form of hash
|
|
520
|
+
def _to_hash(value)
|
|
521
|
+
if value.is_a?(Array)
|
|
522
|
+
value.compact.map { |v| _to_hash(v) }
|
|
523
|
+
elsif value.is_a?(Hash)
|
|
524
|
+
{}.tap do |hash|
|
|
525
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
526
|
+
end
|
|
527
|
+
elsif value.respond_to? :to_hash
|
|
528
|
+
value.to_hash
|
|
529
|
+
else
|
|
530
|
+
value
|
|
531
|
+
end
|
|
532
|
+
end
|
|
533
|
+
end
|
|
534
|
+
end
|