daytona_api_client 0.216.1 → 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 +4 -4
- data/Gemfile +9 -0
- data/Gemfile.lock +101 -0
- data/daytona_api_client.gemspec +4 -4
- data/lib/daytona_api_client/api/api_keys_api.rb +2 -2
- data/lib/daytona_api_client/api/audit_api.rb +102 -59
- data/lib/daytona_api_client/api/config_api.rb +1 -1
- data/lib/daytona_api_client/api/docker_registry_api.rb +67 -6
- data/lib/daytona_api_client/api/health_api.rb +3 -54
- data/lib/daytona_api_client/api/object_storage_api.rb +1 -1
- data/lib/daytona_api_client/api/organizations_api.rb +279 -1591
- data/lib/daytona_api_client/api/preview_api.rb +8 -202
- data/lib/daytona_api_client/api/runners_api.rb +22 -470
- data/lib/daytona_api_client/api/sandbox_api.rb +429 -2200
- data/lib/daytona_api_client/api/snapshots_api.rb +117 -46
- data/lib/daytona_api_client/api/toolbox_api.rb +5108 -0
- data/lib/daytona_api_client/api/users_api.rb +172 -100
- data/lib/daytona_api_client/api/volumes_api.rb +2 -2
- data/lib/daytona_api_client/api/webhooks_api.rb +164 -27
- data/lib/daytona_api_client/api/workspace_api.rb +955 -0
- data/lib/daytona_api_client/api_client.rb +4 -8
- data/lib/daytona_api_client/api_error.rb +1 -1
- data/lib/daytona_api_client/configuration.rb +2 -5
- data/lib/daytona_api_client/models/account_provider.rb +93 -51
- data/lib/daytona_api_client/models/announcement.rb +74 -3
- data/lib/daytona_api_client/models/api_key_list.rb +78 -17
- data/lib/daytona_api_client/models/api_key_response.rb +74 -3
- data/lib/daytona_api_client/models/audit_log.rb +75 -22
- data/lib/daytona_api_client/models/build_info.rb +78 -34
- data/lib/daytona_api_client/models/{create_runner_response.rb → command.rb} +104 -23
- 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/{paginated_traces.rb → completion_list.rb} +106 -91
- 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/{audit_target_scenario.rb → computer_use_status_response.rb} +96 -44
- data/lib/daytona_api_client/models/computer_use_stop_response.rb +263 -0
- data/lib/daytona_api_client/models/create_api_key.rb +75 -4
- data/lib/daytona_api_client/models/create_audit_log.rb +350 -0
- data/lib/daytona_api_client/models/create_build_info.rb +74 -3
- data/lib/daytona_api_client/models/create_docker_registry.rb +139 -7
- data/lib/daytona_api_client/models/create_linked_account.rb +74 -3
- data/lib/daytona_api_client/models/create_organization.rb +78 -34
- data/lib/daytona_api_client/models/create_organization_invitation.rb +76 -5
- data/lib/daytona_api_client/models/create_organization_quota.rb +290 -0
- data/lib/daytona_api_client/models/create_organization_role.rb +74 -3
- data/lib/daytona_api_client/models/create_runner.rb +361 -51
- data/lib/daytona_api_client/models/create_sandbox.rb +117 -108
- data/lib/daytona_api_client/models/{signed_port_preview_url.rb → create_session_request.rb} +93 -103
- data/lib/daytona_api_client/models/create_snapshot.rb +88 -61
- data/lib/daytona_api_client/models/{volume_created_webhook.rb → create_user.rb} +113 -131
- data/lib/daytona_api_client/models/create_volume.rb +74 -3
- data/lib/daytona_api_client/models/create_workspace.rb +411 -0
- data/lib/daytona_api_client/models/daytona_configuration.rb +78 -140
- data/lib/daytona_api_client/models/{runner_service_health.rb → display_info_response.rb} +95 -59
- data/lib/daytona_api_client/models/docker_registry.rb +76 -5
- data/lib/daytona_api_client/models/{oidc_id_p_config.rb → download_files.rb} +95 -86
- data/lib/daytona_api_client/models/{create_warm_pool.rb → execute_request.rb} +106 -62
- data/lib/daytona_api_client/models/{metric_data_point.rb → execute_response.rb} +109 -38
- data/lib/daytona_api_client/models/file_info.rb +417 -0
- data/lib/daytona_api_client/models/{snapshot_removed_webhook.rb → file_status.rb} +133 -142
- data/lib/daytona_api_client/models/git_add_request.rb +264 -0
- data/lib/daytona_api_client/models/{create_secret.rb → git_branch_request.rb} +106 -59
- data/lib/daytona_api_client/models/git_checkout_request.rb +261 -0
- data/lib/daytona_api_client/models/{toolbox_proxy_url.rb → git_clone_request.rb} +142 -10
- data/lib/daytona_api_client/models/{snapshot_created_webhook.rb → git_commit_info.rb} +151 -161
- data/lib/daytona_api_client/models/git_commit_request.rb +325 -0
- data/lib/daytona_api_client/models/{runner_healthcheck.rb → git_commit_response.rb} +92 -74
- data/lib/daytona_api_client/models/{create_region.rb → git_delete_branch_request.rb} +106 -54
- data/lib/daytona_api_client/models/{snapshot_manager_credentials.rb → git_repo_request.rb} +96 -35
- data/lib/daytona_api_client/models/git_status.rb +290 -0
- data/lib/daytona_api_client/models/health_controller_check200_response.rb +74 -3
- data/lib/daytona_api_client/models/health_controller_check200_response_info_value.rb +74 -3
- data/lib/daytona_api_client/models/health_controller_check503_response.rb +74 -3
- data/lib/daytona_api_client/models/{oidc_id_p_config_response.rb → keyboard_hotkey_request.rb} +93 -59
- data/lib/daytona_api_client/models/{create_region_response.rb → keyboard_press_request.rb} +102 -63
- 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/{gpu_capacity.rb → lsp_server_request.rb} +109 -104
- data/lib/daytona_api_client/models/{secret.rb → lsp_symbol.rb} +121 -146
- 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/{available_sandbox_class.rb → mouse_position.rb} +109 -95
- data/lib/daytona_api_client/models/mouse_scroll_request.rb +300 -0
- data/lib/daytona_api_client/models/{test_identity_provider_connection_response.rb → mouse_scroll_response.rb} +81 -30
- data/lib/daytona_api_client/models/oidc_config.rb +78 -68
- data/lib/daytona_api_client/models/organization.rb +159 -307
- data/lib/daytona_api_client/models/organization_invitation.rb +78 -7
- data/lib/daytona_api_client/models/organization_role.rb +74 -3
- 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 +220 -21
- data/lib/daytona_api_client/models/organization_user.rb +76 -5
- data/lib/daytona_api_client/models/paginated_audit_logs.rb +80 -19
- data/lib/daytona_api_client/models/{paginated_jobs.rb → paginated_sandboxes.rb} +80 -9
- data/lib/daytona_api_client/models/paginated_snapshots.rb +77 -6
- data/lib/daytona_api_client/models/{paginated_logs.rb → paginated_snapshots_dto.rb} +80 -13
- data/lib/daytona_api_client/models/port_preview_url.rb +88 -34
- data/lib/daytona_api_client/models/position.rb +261 -0
- data/lib/daytona_api_client/models/posthog_config.rb +74 -3
- 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/{update_last_activity.rb → project_dir_response.rb} +83 -13
- data/lib/daytona_api_client/models/{pending_sso_link.rb → pty_create_request.rb} +114 -109
- data/lib/daytona_api_client/models/pty_create_response.rb +236 -0
- data/lib/daytona_api_client/models/{sandbox_identity.rb → pty_list_response.rb} +95 -49
- 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 +78 -192
- data/lib/daytona_api_client/models/{regenerate_api_key_response.rb → region_screenshot_response.rb} +113 -22
- data/lib/daytona_api_client/models/registry_push_access_dto.rb +74 -3
- 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 +215 -155
- data/lib/daytona_api_client/models/runner_snapshot_dto.rb +91 -3
- data/lib/daytona_api_client/models/runner_state.rb +3 -4
- data/lib/daytona_api_client/models/sandbox.rb +105 -210
- data/lib/daytona_api_client/models/sandbox_class.rb +6 -8
- data/lib/daytona_api_client/models/sandbox_desired_state.rb +3 -5
- data/lib/daytona_api_client/models/{create_sandbox_snapshot.rb → sandbox_info.rb} +113 -17
- data/lib/daytona_api_client/models/sandbox_labels.rb +74 -3
- data/lib/daytona_api_client/models/sandbox_state.rb +3 -10
- data/lib/daytona_api_client/models/sandbox_volume.rb +79 -18
- data/lib/daytona_api_client/models/screenshot_response.rb +256 -0
- data/lib/daytona_api_client/models/{gpu_capacity_response.rb → search_files_response.rb} +93 -49
- 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/{list_sandboxes_response.rb → session_execute_request.rb} +110 -34
- data/lib/daytona_api_client/models/session_execute_response.rb +239 -0
- data/lib/daytona_api_client/models/{generate_workos_admin_portal_link.rb → set_snapshot_general_status_dto.rb} +93 -44
- data/lib/daytona_api_client/models/snapshot_dto.rb +78 -84
- data/lib/daytona_api_client/models/snapshot_state.rb +6 -5
- data/lib/daytona_api_client/models/ssh_access_dto.rb +78 -34
- data/lib/daytona_api_client/models/ssh_access_validation_dto.rb +98 -7
- data/lib/daytona_api_client/models/storage_access_dto.rb +78 -34
- data/lib/daytona_api_client/models/update_docker_registry.rb +74 -3
- data/lib/daytona_api_client/models/update_organization_invitation.rb +76 -5
- data/lib/daytona_api_client/models/update_organization_member_access.rb +76 -5
- data/lib/daytona_api_client/models/update_organization_quota.rb +317 -0
- data/lib/daytona_api_client/models/update_organization_role.rb +74 -3
- data/lib/daytona_api_client/models/update_sandbox_state_dto.rb +80 -29
- data/lib/daytona_api_client/models/user.rb +75 -51
- data/lib/daytona_api_client/models/{list_secrets_response.rb → user_home_dir_response.rb} +83 -72
- data/lib/daytona_api_client/models/user_public_key.rb +74 -3
- data/lib/daytona_api_client/models/volume_dto.rb +74 -3
- data/lib/daytona_api_client/models/volume_state.rb +3 -4
- data/lib/daytona_api_client/models/webhook_app_portal_access.rb +75 -31
- data/lib/daytona_api_client/models/{preview_warning.rb → webhook_controller_get_status200_response.rb} +76 -23
- data/lib/daytona_api_client/models/webhook_initialization_status.rb +74 -3
- data/lib/daytona_api_client/models/windows_response.rb +265 -0
- data/lib/daytona_api_client/models/{update_job_status.rb → work_dir_response.rb} +83 -72
- data/lib/daytona_api_client/models/{sandbox_list_item.rb → workspace.rb} +303 -226
- data/lib/daytona_api_client/version.rb +2 -2
- data/lib/daytona_api_client.rb +83 -93
- data/project.json +13 -38
- metadata +88 -102
- data/.gitignore +0 -39
- data/.openapi-generator/FILES +0 -175
- data/.openapi-generator/VERSION +0 -1
- data/.openapi-generator-ignore +0 -31
- data/.rspec +0 -2
- data/.rubocop.yml +0 -148
- data/fix-gemspec.sh +0 -11
- data/lib/daytona_api_client/api/jobs_api.rb +0 -299
- data/lib/daytona_api_client/api/regions_api.rb +0 -77
- data/lib/daytona_api_client/api/secret_api.rb +0 -441
- data/lib/daytona_api_client/api/warm_pools_api.rb +0 -286
- data/lib/daytona_api_client/api_model_base.rb +0 -88
- data/lib/daytona_api_client/models/audit_scenarios.rb +0 -167
- data/lib/daytona_api_client/models/create_identity_provider.rb +0 -269
- data/lib/daytona_api_client/models/create_runner_sandbox_class.rb +0 -42
- data/lib/daytona_api_client/models/date_filter.rb +0 -178
- data/lib/daytona_api_client/models/fork_sandbox.rb +0 -148
- data/lib/daytona_api_client/models/gpu_type.rb +0 -45
- data/lib/daytona_api_client/models/identity_provider.rb +0 -439
- data/lib/daytona_api_client/models/int_filter.rb +0 -222
- data/lib/daytona_api_client/models/job.rb +0 -366
- data/lib/daytona_api_client/models/job_status.rb +0 -43
- data/lib/daytona_api_client/models/job_type.rb +0 -55
- data/lib/daytona_api_client/models/log_entry.rb +0 -334
- data/lib/daytona_api_client/models/metric_series.rb +0 -194
- data/lib/daytona_api_client/models/metrics_response.rb +0 -167
- data/lib/daytona_api_client/models/otel_config.rb +0 -188
- data/lib/daytona_api_client/models/poll_jobs_response.rb +0 -167
- data/lib/daytona_api_client/models/rate_limit_config.rb +0 -188
- data/lib/daytona_api_client/models/rate_limit_entry.rb +0 -158
- data/lib/daytona_api_client/models/region_quota.rb +0 -453
- data/lib/daytona_api_client/models/region_type.rb +0 -42
- data/lib/daytona_api_client/models/region_usage_overview.rb +0 -518
- data/lib/daytona_api_client/models/resize_sandbox.rb +0 -225
- data/lib/daytona_api_client/models/resolve_sandbox_secrets200_response_inner.rb +0 -176
- data/lib/daytona_api_client/models/runner_class.rb +0 -40
- data/lib/daytona_api_client/models/runner_full.rb +0 -757
- data/lib/daytona_api_client/models/runner_health_metrics.rb +0 -482
- data/lib/daytona_api_client/models/sandbox_created_webhook.rb +0 -349
- data/lib/daytona_api_client/models/sandbox_list_sort_direction.rb +0 -41
- data/lib/daytona_api_client/models/sandbox_list_sort_field.rb +0 -45
- data/lib/daytona_api_client/models/sandbox_state_updated_webhook.rb +0 -349
- data/lib/daytona_api_client/models/snapshot_state_updated_webhook.rb +0 -376
- data/lib/daytona_api_client/models/sso_oidc_config.rb +0 -192
- data/lib/daytona_api_client/models/string_filter.rb +0 -182
- data/lib/daytona_api_client/models/test_identity_provider_connection.rb +0 -165
- data/lib/daytona_api_client/models/trace_span.rb +0 -332
- data/lib/daytona_api_client/models/trace_summary.rb +0 -310
- data/lib/daytona_api_client/models/update_identity_provider.rb +0 -212
- data/lib/daytona_api_client/models/update_oidc_id_p_config.rb +0 -178
- data/lib/daytona_api_client/models/update_organization_default_region.rb +0 -165
- data/lib/daytona_api_client/models/update_region.rb +0 -182
- data/lib/daytona_api_client/models/update_sandbox_network_settings.rb +0 -168
- data/lib/daytona_api_client/models/update_sandbox_secrets.rb +0 -167
- data/lib/daytona_api_client/models/update_secret.rb +0 -170
- data/lib/daytona_api_client/models/update_warm_pool.rb +0 -174
- data/lib/daytona_api_client/models/url.rb +0 -165
- data/lib/daytona_api_client/models/volume_state_updated_webhook.rb +0 -376
- data/lib/daytona_api_client/models/warm_pool.rb +0 -490
- data/lib/daytona_api_client/models/webhook_event.rb +0 -46
- data/lib/daytona_api_client/models/workos_admin_portal_intent.rb +0 -41
- data/lib/daytona_api_client/models/workos_admin_portal_link.rb +0 -165
- data/lib/daytona_api_client/models/workos_sso_connection.rb +0 -329
|
@@ -1,349 +0,0 @@
|
|
|
1
|
-
=begin
|
|
2
|
-
#Daytona
|
|
3
|
-
|
|
4
|
-
#Daytona AI platform API Docs
|
|
5
|
-
|
|
6
|
-
The version of the OpenAPI document: 1.0
|
|
7
|
-
Contact: support@daytona.com
|
|
8
|
-
Generated by: https://openapi-generator.tech
|
|
9
|
-
Generator version: 7.21.0
|
|
10
|
-
|
|
11
|
-
=end
|
|
12
|
-
|
|
13
|
-
require 'date'
|
|
14
|
-
require 'time'
|
|
15
|
-
|
|
16
|
-
module DaytonaApiClient
|
|
17
|
-
class SandboxStateUpdatedWebhook < ApiModelBase
|
|
18
|
-
# Event type identifier
|
|
19
|
-
attr_accessor :event
|
|
20
|
-
|
|
21
|
-
# Timestamp when the event occurred
|
|
22
|
-
attr_accessor :timestamp
|
|
23
|
-
|
|
24
|
-
# Sandbox ID
|
|
25
|
-
attr_accessor :id
|
|
26
|
-
|
|
27
|
-
# Organization ID
|
|
28
|
-
attr_accessor :organization_id
|
|
29
|
-
|
|
30
|
-
# Previous state
|
|
31
|
-
attr_accessor :old_state
|
|
32
|
-
|
|
33
|
-
# New state
|
|
34
|
-
attr_accessor :new_state
|
|
35
|
-
|
|
36
|
-
# When the sandbox was last updated
|
|
37
|
-
attr_accessor :updated_at
|
|
38
|
-
|
|
39
|
-
class EnumAttributeValidator
|
|
40
|
-
attr_reader :datatype
|
|
41
|
-
attr_reader :allowable_values
|
|
42
|
-
|
|
43
|
-
def initialize(datatype, allowable_values)
|
|
44
|
-
@allowable_values = allowable_values.map do |value|
|
|
45
|
-
case datatype.to_s
|
|
46
|
-
when /Integer/i
|
|
47
|
-
value.to_i
|
|
48
|
-
when /Float/i
|
|
49
|
-
value.to_f
|
|
50
|
-
else
|
|
51
|
-
value
|
|
52
|
-
end
|
|
53
|
-
end
|
|
54
|
-
end
|
|
55
|
-
|
|
56
|
-
def valid?(value)
|
|
57
|
-
!value || allowable_values.include?(value)
|
|
58
|
-
end
|
|
59
|
-
end
|
|
60
|
-
|
|
61
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
|
62
|
-
def self.attribute_map
|
|
63
|
-
{
|
|
64
|
-
:'event' => :'event',
|
|
65
|
-
:'timestamp' => :'timestamp',
|
|
66
|
-
:'id' => :'id',
|
|
67
|
-
:'organization_id' => :'organizationId',
|
|
68
|
-
:'old_state' => :'oldState',
|
|
69
|
-
:'new_state' => :'newState',
|
|
70
|
-
:'updated_at' => :'updatedAt'
|
|
71
|
-
}
|
|
72
|
-
end
|
|
73
|
-
|
|
74
|
-
# Returns attribute mapping this model knows about
|
|
75
|
-
def self.acceptable_attribute_map
|
|
76
|
-
attribute_map
|
|
77
|
-
end
|
|
78
|
-
|
|
79
|
-
# Returns all the JSON keys this model knows about
|
|
80
|
-
def self.acceptable_attributes
|
|
81
|
-
acceptable_attribute_map.values
|
|
82
|
-
end
|
|
83
|
-
|
|
84
|
-
# Attribute type mapping.
|
|
85
|
-
def self.openapi_types
|
|
86
|
-
{
|
|
87
|
-
:'event' => :'WebhookEvent',
|
|
88
|
-
:'timestamp' => :'Time',
|
|
89
|
-
:'id' => :'String',
|
|
90
|
-
:'organization_id' => :'String',
|
|
91
|
-
:'old_state' => :'SandboxState',
|
|
92
|
-
:'new_state' => :'SandboxState',
|
|
93
|
-
:'updated_at' => :'Time'
|
|
94
|
-
}
|
|
95
|
-
end
|
|
96
|
-
|
|
97
|
-
# List of attributes with nullable: true
|
|
98
|
-
def self.openapi_nullable
|
|
99
|
-
Set.new([
|
|
100
|
-
])
|
|
101
|
-
end
|
|
102
|
-
|
|
103
|
-
# Initializes the object
|
|
104
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
105
|
-
def initialize(attributes = {})
|
|
106
|
-
if (!attributes.is_a?(Hash))
|
|
107
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::SandboxStateUpdatedWebhook` initialize method"
|
|
108
|
-
end
|
|
109
|
-
|
|
110
|
-
# check to see if the attribute exists and convert string to symbol for hash key
|
|
111
|
-
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
112
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
113
|
-
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
114
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::SandboxStateUpdatedWebhook`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
115
|
-
end
|
|
116
|
-
h[k.to_sym] = v
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
if attributes.key?(:'event')
|
|
120
|
-
self.event = attributes[:'event']
|
|
121
|
-
else
|
|
122
|
-
self.event = nil
|
|
123
|
-
end
|
|
124
|
-
|
|
125
|
-
if attributes.key?(:'timestamp')
|
|
126
|
-
self.timestamp = attributes[:'timestamp']
|
|
127
|
-
else
|
|
128
|
-
self.timestamp = nil
|
|
129
|
-
end
|
|
130
|
-
|
|
131
|
-
if attributes.key?(:'id')
|
|
132
|
-
self.id = attributes[:'id']
|
|
133
|
-
else
|
|
134
|
-
self.id = nil
|
|
135
|
-
end
|
|
136
|
-
|
|
137
|
-
if attributes.key?(:'organization_id')
|
|
138
|
-
self.organization_id = attributes[:'organization_id']
|
|
139
|
-
else
|
|
140
|
-
self.organization_id = nil
|
|
141
|
-
end
|
|
142
|
-
|
|
143
|
-
if attributes.key?(:'old_state')
|
|
144
|
-
self.old_state = attributes[:'old_state']
|
|
145
|
-
else
|
|
146
|
-
self.old_state = nil
|
|
147
|
-
end
|
|
148
|
-
|
|
149
|
-
if attributes.key?(:'new_state')
|
|
150
|
-
self.new_state = attributes[:'new_state']
|
|
151
|
-
else
|
|
152
|
-
self.new_state = nil
|
|
153
|
-
end
|
|
154
|
-
|
|
155
|
-
if attributes.key?(:'updated_at')
|
|
156
|
-
self.updated_at = attributes[:'updated_at']
|
|
157
|
-
else
|
|
158
|
-
self.updated_at = nil
|
|
159
|
-
end
|
|
160
|
-
end
|
|
161
|
-
|
|
162
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
|
163
|
-
# @return Array for valid properties with the reasons
|
|
164
|
-
def list_invalid_properties
|
|
165
|
-
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
166
|
-
invalid_properties = Array.new
|
|
167
|
-
if @event.nil?
|
|
168
|
-
invalid_properties.push('invalid value for "event", event cannot be nil.')
|
|
169
|
-
end
|
|
170
|
-
|
|
171
|
-
if @timestamp.nil?
|
|
172
|
-
invalid_properties.push('invalid value for "timestamp", timestamp cannot be nil.')
|
|
173
|
-
end
|
|
174
|
-
|
|
175
|
-
if @id.nil?
|
|
176
|
-
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
177
|
-
end
|
|
178
|
-
|
|
179
|
-
if @organization_id.nil?
|
|
180
|
-
invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.')
|
|
181
|
-
end
|
|
182
|
-
|
|
183
|
-
if @old_state.nil?
|
|
184
|
-
invalid_properties.push('invalid value for "old_state", old_state cannot be nil.')
|
|
185
|
-
end
|
|
186
|
-
|
|
187
|
-
if @new_state.nil?
|
|
188
|
-
invalid_properties.push('invalid value for "new_state", new_state cannot be nil.')
|
|
189
|
-
end
|
|
190
|
-
|
|
191
|
-
if @updated_at.nil?
|
|
192
|
-
invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
|
|
193
|
-
end
|
|
194
|
-
|
|
195
|
-
invalid_properties
|
|
196
|
-
end
|
|
197
|
-
|
|
198
|
-
# Check to see if the all the properties in the model are valid
|
|
199
|
-
# @return true if the model is valid
|
|
200
|
-
def valid?
|
|
201
|
-
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
202
|
-
return false if @event.nil?
|
|
203
|
-
return false if @timestamp.nil?
|
|
204
|
-
return false if @id.nil?
|
|
205
|
-
return false if @organization_id.nil?
|
|
206
|
-
return false if @old_state.nil?
|
|
207
|
-
return false if @new_state.nil?
|
|
208
|
-
return false if @updated_at.nil?
|
|
209
|
-
true
|
|
210
|
-
end
|
|
211
|
-
|
|
212
|
-
# Custom attribute writer method with validation
|
|
213
|
-
# @param [Object] event Value to be assigned
|
|
214
|
-
def event=(event)
|
|
215
|
-
if event.nil?
|
|
216
|
-
fail ArgumentError, 'event cannot be nil'
|
|
217
|
-
end
|
|
218
|
-
|
|
219
|
-
@event = event
|
|
220
|
-
end
|
|
221
|
-
|
|
222
|
-
# Custom attribute writer method with validation
|
|
223
|
-
# @param [Object] timestamp Value to be assigned
|
|
224
|
-
def timestamp=(timestamp)
|
|
225
|
-
if timestamp.nil?
|
|
226
|
-
fail ArgumentError, 'timestamp cannot be nil'
|
|
227
|
-
end
|
|
228
|
-
|
|
229
|
-
@timestamp = timestamp
|
|
230
|
-
end
|
|
231
|
-
|
|
232
|
-
# Custom attribute writer method with validation
|
|
233
|
-
# @param [Object] id Value to be assigned
|
|
234
|
-
def id=(id)
|
|
235
|
-
if id.nil?
|
|
236
|
-
fail ArgumentError, 'id cannot be nil'
|
|
237
|
-
end
|
|
238
|
-
|
|
239
|
-
@id = id
|
|
240
|
-
end
|
|
241
|
-
|
|
242
|
-
# Custom attribute writer method with validation
|
|
243
|
-
# @param [Object] organization_id Value to be assigned
|
|
244
|
-
def organization_id=(organization_id)
|
|
245
|
-
if organization_id.nil?
|
|
246
|
-
fail ArgumentError, 'organization_id cannot be nil'
|
|
247
|
-
end
|
|
248
|
-
|
|
249
|
-
@organization_id = organization_id
|
|
250
|
-
end
|
|
251
|
-
|
|
252
|
-
# Custom attribute writer method with validation
|
|
253
|
-
# @param [Object] old_state Value to be assigned
|
|
254
|
-
def old_state=(old_state)
|
|
255
|
-
if old_state.nil?
|
|
256
|
-
fail ArgumentError, 'old_state cannot be nil'
|
|
257
|
-
end
|
|
258
|
-
|
|
259
|
-
@old_state = old_state
|
|
260
|
-
end
|
|
261
|
-
|
|
262
|
-
# Custom attribute writer method with validation
|
|
263
|
-
# @param [Object] new_state Value to be assigned
|
|
264
|
-
def new_state=(new_state)
|
|
265
|
-
if new_state.nil?
|
|
266
|
-
fail ArgumentError, 'new_state cannot be nil'
|
|
267
|
-
end
|
|
268
|
-
|
|
269
|
-
@new_state = new_state
|
|
270
|
-
end
|
|
271
|
-
|
|
272
|
-
# Custom attribute writer method with validation
|
|
273
|
-
# @param [Object] updated_at Value to be assigned
|
|
274
|
-
def updated_at=(updated_at)
|
|
275
|
-
if updated_at.nil?
|
|
276
|
-
fail ArgumentError, 'updated_at cannot be nil'
|
|
277
|
-
end
|
|
278
|
-
|
|
279
|
-
@updated_at = updated_at
|
|
280
|
-
end
|
|
281
|
-
|
|
282
|
-
# Checks equality by comparing each attribute.
|
|
283
|
-
# @param [Object] Object to be compared
|
|
284
|
-
def ==(o)
|
|
285
|
-
return true if self.equal?(o)
|
|
286
|
-
self.class == o.class &&
|
|
287
|
-
event == o.event &&
|
|
288
|
-
timestamp == o.timestamp &&
|
|
289
|
-
id == o.id &&
|
|
290
|
-
organization_id == o.organization_id &&
|
|
291
|
-
old_state == o.old_state &&
|
|
292
|
-
new_state == o.new_state &&
|
|
293
|
-
updated_at == o.updated_at
|
|
294
|
-
end
|
|
295
|
-
|
|
296
|
-
# @see the `==` method
|
|
297
|
-
# @param [Object] Object to be compared
|
|
298
|
-
def eql?(o)
|
|
299
|
-
self == o
|
|
300
|
-
end
|
|
301
|
-
|
|
302
|
-
# Calculates hash code according to all attributes.
|
|
303
|
-
# @return [Integer] Hash code
|
|
304
|
-
def hash
|
|
305
|
-
[event, timestamp, id, organization_id, old_state, new_state, updated_at].hash
|
|
306
|
-
end
|
|
307
|
-
|
|
308
|
-
# Builds the object from hash
|
|
309
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
310
|
-
# @return [Object] Returns the model itself
|
|
311
|
-
def self.build_from_hash(attributes)
|
|
312
|
-
return nil unless attributes.is_a?(Hash)
|
|
313
|
-
attributes = attributes.transform_keys(&:to_sym)
|
|
314
|
-
transformed_hash = {}
|
|
315
|
-
openapi_types.each_pair do |key, type|
|
|
316
|
-
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
317
|
-
transformed_hash["#{key}"] = nil
|
|
318
|
-
elsif type =~ /\AArray<(.*)>/i
|
|
319
|
-
# check to ensure the input is an array given that the attribute
|
|
320
|
-
# is documented as an array but the input is not
|
|
321
|
-
if attributes[attribute_map[key]].is_a?(Array)
|
|
322
|
-
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
323
|
-
end
|
|
324
|
-
elsif !attributes[attribute_map[key]].nil?
|
|
325
|
-
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
326
|
-
end
|
|
327
|
-
end
|
|
328
|
-
new(transformed_hash)
|
|
329
|
-
end
|
|
330
|
-
|
|
331
|
-
# Returns the object in the form of hash
|
|
332
|
-
# @return [Hash] Returns the object in the form of hash
|
|
333
|
-
def to_hash
|
|
334
|
-
hash = {}
|
|
335
|
-
self.class.attribute_map.each_pair do |attr, param|
|
|
336
|
-
value = self.send(attr)
|
|
337
|
-
if value.nil?
|
|
338
|
-
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
339
|
-
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
340
|
-
end
|
|
341
|
-
|
|
342
|
-
hash[param] = _to_hash(value)
|
|
343
|
-
end
|
|
344
|
-
hash
|
|
345
|
-
end
|
|
346
|
-
|
|
347
|
-
end
|
|
348
|
-
|
|
349
|
-
end
|
|
@@ -1,376 +0,0 @@
|
|
|
1
|
-
=begin
|
|
2
|
-
#Daytona
|
|
3
|
-
|
|
4
|
-
#Daytona AI platform API Docs
|
|
5
|
-
|
|
6
|
-
The version of the OpenAPI document: 1.0
|
|
7
|
-
Contact: support@daytona.com
|
|
8
|
-
Generated by: https://openapi-generator.tech
|
|
9
|
-
Generator version: 7.21.0
|
|
10
|
-
|
|
11
|
-
=end
|
|
12
|
-
|
|
13
|
-
require 'date'
|
|
14
|
-
require 'time'
|
|
15
|
-
|
|
16
|
-
module DaytonaApiClient
|
|
17
|
-
class SnapshotStateUpdatedWebhook < ApiModelBase
|
|
18
|
-
# Event type identifier
|
|
19
|
-
attr_accessor :event
|
|
20
|
-
|
|
21
|
-
# Timestamp when the event occurred
|
|
22
|
-
attr_accessor :timestamp
|
|
23
|
-
|
|
24
|
-
# Snapshot ID
|
|
25
|
-
attr_accessor :id
|
|
26
|
-
|
|
27
|
-
# Snapshot name
|
|
28
|
-
attr_accessor :name
|
|
29
|
-
|
|
30
|
-
# Organization ID
|
|
31
|
-
attr_accessor :organization_id
|
|
32
|
-
|
|
33
|
-
# Previous state
|
|
34
|
-
attr_accessor :old_state
|
|
35
|
-
|
|
36
|
-
# New state
|
|
37
|
-
attr_accessor :new_state
|
|
38
|
-
|
|
39
|
-
# When the snapshot was last updated
|
|
40
|
-
attr_accessor :updated_at
|
|
41
|
-
|
|
42
|
-
class EnumAttributeValidator
|
|
43
|
-
attr_reader :datatype
|
|
44
|
-
attr_reader :allowable_values
|
|
45
|
-
|
|
46
|
-
def initialize(datatype, allowable_values)
|
|
47
|
-
@allowable_values = allowable_values.map do |value|
|
|
48
|
-
case datatype.to_s
|
|
49
|
-
when /Integer/i
|
|
50
|
-
value.to_i
|
|
51
|
-
when /Float/i
|
|
52
|
-
value.to_f
|
|
53
|
-
else
|
|
54
|
-
value
|
|
55
|
-
end
|
|
56
|
-
end
|
|
57
|
-
end
|
|
58
|
-
|
|
59
|
-
def valid?(value)
|
|
60
|
-
!value || allowable_values.include?(value)
|
|
61
|
-
end
|
|
62
|
-
end
|
|
63
|
-
|
|
64
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
|
65
|
-
def self.attribute_map
|
|
66
|
-
{
|
|
67
|
-
:'event' => :'event',
|
|
68
|
-
:'timestamp' => :'timestamp',
|
|
69
|
-
:'id' => :'id',
|
|
70
|
-
:'name' => :'name',
|
|
71
|
-
:'organization_id' => :'organizationId',
|
|
72
|
-
:'old_state' => :'oldState',
|
|
73
|
-
:'new_state' => :'newState',
|
|
74
|
-
:'updated_at' => :'updatedAt'
|
|
75
|
-
}
|
|
76
|
-
end
|
|
77
|
-
|
|
78
|
-
# Returns attribute mapping this model knows about
|
|
79
|
-
def self.acceptable_attribute_map
|
|
80
|
-
attribute_map
|
|
81
|
-
end
|
|
82
|
-
|
|
83
|
-
# Returns all the JSON keys this model knows about
|
|
84
|
-
def self.acceptable_attributes
|
|
85
|
-
acceptable_attribute_map.values
|
|
86
|
-
end
|
|
87
|
-
|
|
88
|
-
# Attribute type mapping.
|
|
89
|
-
def self.openapi_types
|
|
90
|
-
{
|
|
91
|
-
:'event' => :'WebhookEvent',
|
|
92
|
-
:'timestamp' => :'Time',
|
|
93
|
-
:'id' => :'String',
|
|
94
|
-
:'name' => :'String',
|
|
95
|
-
:'organization_id' => :'String',
|
|
96
|
-
:'old_state' => :'SnapshotState',
|
|
97
|
-
:'new_state' => :'SnapshotState',
|
|
98
|
-
:'updated_at' => :'Time'
|
|
99
|
-
}
|
|
100
|
-
end
|
|
101
|
-
|
|
102
|
-
# List of attributes with nullable: true
|
|
103
|
-
def self.openapi_nullable
|
|
104
|
-
Set.new([
|
|
105
|
-
])
|
|
106
|
-
end
|
|
107
|
-
|
|
108
|
-
# Initializes the object
|
|
109
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
110
|
-
def initialize(attributes = {})
|
|
111
|
-
if (!attributes.is_a?(Hash))
|
|
112
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `DaytonaApiClient::SnapshotStateUpdatedWebhook` initialize method"
|
|
113
|
-
end
|
|
114
|
-
|
|
115
|
-
# check to see if the attribute exists and convert string to symbol for hash key
|
|
116
|
-
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
117
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
118
|
-
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
119
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `DaytonaApiClient::SnapshotStateUpdatedWebhook`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
120
|
-
end
|
|
121
|
-
h[k.to_sym] = v
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
if attributes.key?(:'event')
|
|
125
|
-
self.event = attributes[:'event']
|
|
126
|
-
else
|
|
127
|
-
self.event = nil
|
|
128
|
-
end
|
|
129
|
-
|
|
130
|
-
if attributes.key?(:'timestamp')
|
|
131
|
-
self.timestamp = attributes[:'timestamp']
|
|
132
|
-
else
|
|
133
|
-
self.timestamp = nil
|
|
134
|
-
end
|
|
135
|
-
|
|
136
|
-
if attributes.key?(:'id')
|
|
137
|
-
self.id = attributes[:'id']
|
|
138
|
-
else
|
|
139
|
-
self.id = nil
|
|
140
|
-
end
|
|
141
|
-
|
|
142
|
-
if attributes.key?(:'name')
|
|
143
|
-
self.name = attributes[:'name']
|
|
144
|
-
else
|
|
145
|
-
self.name = nil
|
|
146
|
-
end
|
|
147
|
-
|
|
148
|
-
if attributes.key?(:'organization_id')
|
|
149
|
-
self.organization_id = attributes[:'organization_id']
|
|
150
|
-
else
|
|
151
|
-
self.organization_id = nil
|
|
152
|
-
end
|
|
153
|
-
|
|
154
|
-
if attributes.key?(:'old_state')
|
|
155
|
-
self.old_state = attributes[:'old_state']
|
|
156
|
-
else
|
|
157
|
-
self.old_state = nil
|
|
158
|
-
end
|
|
159
|
-
|
|
160
|
-
if attributes.key?(:'new_state')
|
|
161
|
-
self.new_state = attributes[:'new_state']
|
|
162
|
-
else
|
|
163
|
-
self.new_state = nil
|
|
164
|
-
end
|
|
165
|
-
|
|
166
|
-
if attributes.key?(:'updated_at')
|
|
167
|
-
self.updated_at = attributes[:'updated_at']
|
|
168
|
-
else
|
|
169
|
-
self.updated_at = nil
|
|
170
|
-
end
|
|
171
|
-
end
|
|
172
|
-
|
|
173
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
|
174
|
-
# @return Array for valid properties with the reasons
|
|
175
|
-
def list_invalid_properties
|
|
176
|
-
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
177
|
-
invalid_properties = Array.new
|
|
178
|
-
if @event.nil?
|
|
179
|
-
invalid_properties.push('invalid value for "event", event cannot be nil.')
|
|
180
|
-
end
|
|
181
|
-
|
|
182
|
-
if @timestamp.nil?
|
|
183
|
-
invalid_properties.push('invalid value for "timestamp", timestamp cannot be nil.')
|
|
184
|
-
end
|
|
185
|
-
|
|
186
|
-
if @id.nil?
|
|
187
|
-
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
188
|
-
end
|
|
189
|
-
|
|
190
|
-
if @name.nil?
|
|
191
|
-
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
192
|
-
end
|
|
193
|
-
|
|
194
|
-
if @organization_id.nil?
|
|
195
|
-
invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.')
|
|
196
|
-
end
|
|
197
|
-
|
|
198
|
-
if @old_state.nil?
|
|
199
|
-
invalid_properties.push('invalid value for "old_state", old_state cannot be nil.')
|
|
200
|
-
end
|
|
201
|
-
|
|
202
|
-
if @new_state.nil?
|
|
203
|
-
invalid_properties.push('invalid value for "new_state", new_state cannot be nil.')
|
|
204
|
-
end
|
|
205
|
-
|
|
206
|
-
if @updated_at.nil?
|
|
207
|
-
invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
|
|
208
|
-
end
|
|
209
|
-
|
|
210
|
-
invalid_properties
|
|
211
|
-
end
|
|
212
|
-
|
|
213
|
-
# Check to see if the all the properties in the model are valid
|
|
214
|
-
# @return true if the model is valid
|
|
215
|
-
def valid?
|
|
216
|
-
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
217
|
-
return false if @event.nil?
|
|
218
|
-
return false if @timestamp.nil?
|
|
219
|
-
return false if @id.nil?
|
|
220
|
-
return false if @name.nil?
|
|
221
|
-
return false if @organization_id.nil?
|
|
222
|
-
return false if @old_state.nil?
|
|
223
|
-
return false if @new_state.nil?
|
|
224
|
-
return false if @updated_at.nil?
|
|
225
|
-
true
|
|
226
|
-
end
|
|
227
|
-
|
|
228
|
-
# Custom attribute writer method with validation
|
|
229
|
-
# @param [Object] event Value to be assigned
|
|
230
|
-
def event=(event)
|
|
231
|
-
if event.nil?
|
|
232
|
-
fail ArgumentError, 'event cannot be nil'
|
|
233
|
-
end
|
|
234
|
-
|
|
235
|
-
@event = event
|
|
236
|
-
end
|
|
237
|
-
|
|
238
|
-
# Custom attribute writer method with validation
|
|
239
|
-
# @param [Object] timestamp Value to be assigned
|
|
240
|
-
def timestamp=(timestamp)
|
|
241
|
-
if timestamp.nil?
|
|
242
|
-
fail ArgumentError, 'timestamp cannot be nil'
|
|
243
|
-
end
|
|
244
|
-
|
|
245
|
-
@timestamp = timestamp
|
|
246
|
-
end
|
|
247
|
-
|
|
248
|
-
# Custom attribute writer method with validation
|
|
249
|
-
# @param [Object] id Value to be assigned
|
|
250
|
-
def id=(id)
|
|
251
|
-
if id.nil?
|
|
252
|
-
fail ArgumentError, 'id cannot be nil'
|
|
253
|
-
end
|
|
254
|
-
|
|
255
|
-
@id = id
|
|
256
|
-
end
|
|
257
|
-
|
|
258
|
-
# Custom attribute writer method with validation
|
|
259
|
-
# @param [Object] name Value to be assigned
|
|
260
|
-
def name=(name)
|
|
261
|
-
if name.nil?
|
|
262
|
-
fail ArgumentError, 'name cannot be nil'
|
|
263
|
-
end
|
|
264
|
-
|
|
265
|
-
@name = name
|
|
266
|
-
end
|
|
267
|
-
|
|
268
|
-
# Custom attribute writer method with validation
|
|
269
|
-
# @param [Object] organization_id Value to be assigned
|
|
270
|
-
def organization_id=(organization_id)
|
|
271
|
-
if organization_id.nil?
|
|
272
|
-
fail ArgumentError, 'organization_id cannot be nil'
|
|
273
|
-
end
|
|
274
|
-
|
|
275
|
-
@organization_id = organization_id
|
|
276
|
-
end
|
|
277
|
-
|
|
278
|
-
# Custom attribute writer method with validation
|
|
279
|
-
# @param [Object] old_state Value to be assigned
|
|
280
|
-
def old_state=(old_state)
|
|
281
|
-
if old_state.nil?
|
|
282
|
-
fail ArgumentError, 'old_state cannot be nil'
|
|
283
|
-
end
|
|
284
|
-
|
|
285
|
-
@old_state = old_state
|
|
286
|
-
end
|
|
287
|
-
|
|
288
|
-
# Custom attribute writer method with validation
|
|
289
|
-
# @param [Object] new_state Value to be assigned
|
|
290
|
-
def new_state=(new_state)
|
|
291
|
-
if new_state.nil?
|
|
292
|
-
fail ArgumentError, 'new_state cannot be nil'
|
|
293
|
-
end
|
|
294
|
-
|
|
295
|
-
@new_state = new_state
|
|
296
|
-
end
|
|
297
|
-
|
|
298
|
-
# Custom attribute writer method with validation
|
|
299
|
-
# @param [Object] updated_at Value to be assigned
|
|
300
|
-
def updated_at=(updated_at)
|
|
301
|
-
if updated_at.nil?
|
|
302
|
-
fail ArgumentError, 'updated_at cannot be nil'
|
|
303
|
-
end
|
|
304
|
-
|
|
305
|
-
@updated_at = updated_at
|
|
306
|
-
end
|
|
307
|
-
|
|
308
|
-
# Checks equality by comparing each attribute.
|
|
309
|
-
# @param [Object] Object to be compared
|
|
310
|
-
def ==(o)
|
|
311
|
-
return true if self.equal?(o)
|
|
312
|
-
self.class == o.class &&
|
|
313
|
-
event == o.event &&
|
|
314
|
-
timestamp == o.timestamp &&
|
|
315
|
-
id == o.id &&
|
|
316
|
-
name == o.name &&
|
|
317
|
-
organization_id == o.organization_id &&
|
|
318
|
-
old_state == o.old_state &&
|
|
319
|
-
new_state == o.new_state &&
|
|
320
|
-
updated_at == o.updated_at
|
|
321
|
-
end
|
|
322
|
-
|
|
323
|
-
# @see the `==` method
|
|
324
|
-
# @param [Object] Object to be compared
|
|
325
|
-
def eql?(o)
|
|
326
|
-
self == o
|
|
327
|
-
end
|
|
328
|
-
|
|
329
|
-
# Calculates hash code according to all attributes.
|
|
330
|
-
# @return [Integer] Hash code
|
|
331
|
-
def hash
|
|
332
|
-
[event, timestamp, id, name, organization_id, old_state, new_state, updated_at].hash
|
|
333
|
-
end
|
|
334
|
-
|
|
335
|
-
# Builds the object from hash
|
|
336
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
337
|
-
# @return [Object] Returns the model itself
|
|
338
|
-
def self.build_from_hash(attributes)
|
|
339
|
-
return nil unless attributes.is_a?(Hash)
|
|
340
|
-
attributes = attributes.transform_keys(&:to_sym)
|
|
341
|
-
transformed_hash = {}
|
|
342
|
-
openapi_types.each_pair do |key, type|
|
|
343
|
-
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
344
|
-
transformed_hash["#{key}"] = nil
|
|
345
|
-
elsif type =~ /\AArray<(.*)>/i
|
|
346
|
-
# check to ensure the input is an array given that the attribute
|
|
347
|
-
# is documented as an array but the input is not
|
|
348
|
-
if attributes[attribute_map[key]].is_a?(Array)
|
|
349
|
-
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
350
|
-
end
|
|
351
|
-
elsif !attributes[attribute_map[key]].nil?
|
|
352
|
-
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
353
|
-
end
|
|
354
|
-
end
|
|
355
|
-
new(transformed_hash)
|
|
356
|
-
end
|
|
357
|
-
|
|
358
|
-
# Returns the object in the form of hash
|
|
359
|
-
# @return [Hash] Returns the object in the form of hash
|
|
360
|
-
def to_hash
|
|
361
|
-
hash = {}
|
|
362
|
-
self.class.attribute_map.each_pair do |attr, param|
|
|
363
|
-
value = self.send(attr)
|
|
364
|
-
if value.nil?
|
|
365
|
-
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
366
|
-
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
367
|
-
end
|
|
368
|
-
|
|
369
|
-
hash[param] = _to_hash(value)
|
|
370
|
-
end
|
|
371
|
-
hash
|
|
372
|
-
end
|
|
373
|
-
|
|
374
|
-
end
|
|
375
|
-
|
|
376
|
-
end
|