comet_backup_ruby_sdk 1.14.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +0 -0
- data/.rubocop.yml +0 -0
- data/CHANGELOG.md +26 -1
- data/Gemfile +2 -4
- data/Gemfile.lock +1 -1
- data/LICENSE +0 -0
- data/RELEASING.md +0 -0
- data/Rakefile +2 -4
- data/comet_backup_ruby_sdk.gemspec +1 -1
- data/lib/comet/api_response_error.rb +2 -4
- data/lib/comet/comet_server.rb +72 -21
- data/lib/comet/definitions.rb +53 -7
- data/lib/comet/models/add_bucket_response_message.rb +2 -4
- data/lib/comet/models/admin_account_properties_response.rb +2 -4
- data/lib/comet/models/admin_email_options.rb +2 -4
- data/lib/comet/models/admin_resource_response.rb +2 -4
- data/lib/comet/models/admin_security_options.rb +2 -4
- data/lib/comet/models/admin_u2fregistration.rb +2 -4
- data/lib/comet/models/admin_user_permissions.rb +2 -4
- data/lib/comet/models/admin_web_authn_registration.rb +2 -4
- data/lib/comet/models/allowed_admin_user.rb +2 -4
- data/lib/{models/wasabi_virtual_storage_role_settings.rb → comet/models/amazon_awsvirtual_storage_role_settings.rb} +4 -6
- data/lib/comet/models/authentication_role_options.rb +149 -0
- data/lib/comet/models/available_download.rb +2 -4
- data/lib/comet/models/azure_destination_location.rb +2 -4
- data/lib/comet/models/b2destination_location.rb +2 -4
- data/lib/comet/models/b2storage_extra_info.rb +2 -4
- data/lib/comet/models/b2transaction_totals.rb +2 -4
- data/lib/comet/models/b2virtual_storage_role_settings.rb +2 -4
- data/lib/comet/models/backup_job_advanced_options.rb +2 -4
- data/lib/comet/models/backup_job_detail.rb +2 -4
- data/lib/comet/models/backup_job_progress.rb +2 -4
- data/lib/comet/models/backup_rule_config.rb +2 -4
- data/lib/comet/models/backup_rule_event_triggers.rb +2 -4
- data/lib/comet/models/branding_options.rb +11 -4
- data/lib/comet/models/branding_properties.rb +11 -4
- data/lib/comet/models/browse_disk_drives_response.rb +2 -4
- data/lib/comet/models/browse_edbresponse.rb +2 -4
- data/lib/comet/models/browse_hvresponse.rb +2 -4
- data/lib/comet/models/browse_office_365list_virtual_accounts_response.rb +2 -4
- data/lib/comet/models/browse_office_365objects_response.rb +2 -4
- data/lib/comet/models/browse_sqlserver_response.rb +2 -4
- data/lib/comet/models/browse_vssresponse.rb +2 -4
- data/lib/comet/models/bucket_properties.rb +2 -4
- data/lib/comet/models/bucket_usage_info.rb +11 -4
- data/lib/comet/models/comet_apiresponse_message.rb +2 -4
- data/lib/comet/models/comet_destination_location.rb +2 -4
- data/lib/comet/models/constellation_check_report.rb +2 -4
- data/lib/{models/software_build_role_options.rb → comet/models/constellation_role_options.rb} +24 -11
- data/lib/comet/models/constellation_stats.rb +2 -4
- data/lib/comet/models/constellation_status_apiresponse.rb +2 -4
- data/lib/comet/models/content_measurement.rb +2 -4
- data/lib/comet/models/content_measurement_component.rb +2 -4
- data/lib/comet/models/create_group_policy_response.rb +2 -4
- data/lib/comet/models/custom_remote_bucket_settings.rb +2 -4
- data/lib/comet/models/days_of_week_config.rb +2 -4
- data/lib/comet/models/default_email_report_policy.rb +2 -4
- data/lib/comet/models/default_source_with_osrestriction.rb +2 -4
- data/lib/comet/models/destination_config.rb +11 -4
- data/lib/comet/models/destination_location.rb +11 -4
- data/lib/comet/models/destination_statistics.rb +2 -4
- data/lib/comet/models/device_config.rb +2 -4
- data/lib/comet/models/disk_drive.rb +2 -4
- data/lib/comet/models/dispatcher_admin_sources_response.rb +2 -4
- data/lib/comet/models/dispatcher_stored_objects_response.rb +2 -4
- data/lib/comet/models/dispatcher_vault_snapshots_response.rb +2 -4
- data/lib/comet/models/dispatcher_windisk_snapshot_response.rb +2 -4
- data/lib/comet/models/edbfile_info.rb +2 -4
- data/lib/comet/models/email_options.rb +2 -4
- data/lib/comet/models/email_report_config.rb +2 -4
- data/lib/comet/models/email_report_generated_preview.rb +2 -4
- data/lib/{models/remote_server_address.rb → comet/models/external_authentication_source.rb} +23 -6
- data/lib/{models/get_profile_hash_response_message.rb → comet/models/external_ldapauthentication_source_server.rb} +30 -26
- data/lib/comet/models/external_ldapauthentication_source_settings.rb +23 -10
- data/lib/comet/models/extra_file_exclusion.rb +2 -4
- data/lib/comet/models/ftpdestination_location.rb +2 -4
- data/lib/comet/models/get_group_policy_response.rb +2 -4
- data/lib/comet/models/get_profile_and_hash_response_message.rb +2 -4
- data/lib/comet/models/get_profile_hash_response_message.rb +2 -4
- data/lib/{models/server_config_options_branding_fragment.rb → comet/models/global_override_options.rb} +14 -13
- data/lib/comet/models/group_policy.rb +2 -4
- data/lib/comet/models/hour_sched_config.rb +2 -4
- data/lib/{models/my_sqlconnection.rb → comet/models/httpconnector_options.rb} +58 -60
- data/lib/comet/models/hyper_vmachine_info.rb +2 -4
- data/lib/comet/models/install_creds.rb +2 -4
- data/lib/comet/models/install_token.rb +2 -4
- data/lib/comet/models/install_token_response.rb +2 -4
- data/lib/comet/models/job_entry.rb +2 -4
- data/lib/{models/web_authn_credential_entity.rb → comet/models/license_options.rb} +17 -19
- data/lib/comet/models/live_user_connection.rb +2 -4
- data/lib/comet/models/local_destination_location.rb +2 -4
- data/lib/{models/custom_remote_bucket_settings.rb → comet/models/local_storage_directory.rb} +10 -12
- data/lib/comet/models/mac_oscode_sign_properties.rb +2 -4
- data/lib/comet/models/mongo_dbconnection.rb +2 -4
- data/lib/comet/models/mssqlconnection.rb +2 -4
- data/lib/comet/models/my_sqlconnection.rb +2 -4
- data/lib/comet/models/new_bucket_detail.rb +2 -4
- data/lib/comet/models/news_entry.rb +2 -4
- data/lib/comet/models/office_365connection.rb +2 -4
- data/lib/comet/models/office_365credential.rb +2 -4
- data/lib/comet/models/office_365custom_setting.rb +2 -4
- data/lib/comet/models/office_365custom_setting_v2.rb +2 -4
- data/lib/comet/models/office_365mixed_virtual_account.rb +13 -4
- data/lib/comet/models/office_365object_info.rb +2 -4
- data/lib/comet/models/organization.rb +5 -7
- data/lib/comet/models/organization_response.rb +2 -4
- data/lib/comet/models/osinfo.rb +2 -4
- data/lib/comet/models/partition.rb +2 -4
- data/lib/comet/models/private_branding_properties.rb +11 -4
- data/lib/comet/models/protected_item_engine_type_policy.rb +2 -4
- data/lib/comet/models/public_branding_properties.rb +2 -4
- data/lib/{models/user_custom_email_settings.rb → comet/models/ratelimit_options.rb} +15 -15
- data/lib/{models/comet_apiresponse_message.rb → comet/models/ratelimit_rule.rb} +18 -20
- data/lib/comet/models/register_office_application_begin_response.rb +2 -4
- data/lib/comet/models/register_office_application_check_response.rb +2 -4
- data/lib/comet/models/remote_server_address.rb +23 -4
- data/lib/comet/models/remote_storage_option.rb +23 -4
- data/lib/{models/remote_storage_option.rb → comet/models/replica_server.rb} +24 -25
- data/lib/comet/models/replicator_state_apiresponse.rb +2 -4
- data/lib/comet/models/request_storage_vault_response_message.rb +2 -4
- data/lib/comet/models/restore_job_advanced_options.rb +8 -4
- data/lib/comet/models/retention_policy.rb +2 -4
- data/lib/comet/models/retention_range.rb +2 -4
- data/lib/comet/models/s3destination_location.rb +11 -4
- data/lib/{models → comet/models}/s3generic_virtual_storage_role.rb +2 -4
- data/lib/comet/models/schedule_config.rb +13 -4
- data/lib/comet/models/search_clause.rb +2 -4
- data/lib/{models/spanned_storage_extra_info.rb → comet/models/self_backup_options.rb} +6 -8
- data/lib/comet/models/self_backup_statistics.rb +2 -4
- data/lib/comet/models/self_backup_target.rb +137 -0
- data/lib/comet/models/server_config_options.rb +253 -0
- data/lib/comet/models/server_config_options_branding_fragment.rb +2 -4
- data/lib/comet/models/server_config_options_software_build_role_fragment.rb +2 -4
- data/lib/comet/models/server_meta_branding_properties.rb +2 -4
- data/lib/comet/models/server_meta_version_info.rb +2 -4
- data/lib/comet/models/session_key_regenerated_response.rb +2 -4
- data/lib/{models/update_campaign_device_status.rb → comet/models/session_options.rb} +10 -12
- data/lib/comet/models/sftpdestination_location.rb +2 -4
- data/lib/comet/models/size_measurement.rb +2 -4
- data/lib/comet/models/software_build_role_options.rb +2 -4
- data/lib/comet/models/software_update_news_response.rb +2 -4
- data/lib/comet/models/source_basic_info.rb +2 -4
- data/lib/comet/models/source_config.rb +2 -4
- data/lib/comet/models/source_include_pattern.rb +2 -4
- data/lib/comet/models/source_statistics.rb +2 -4
- data/lib/comet/models/spanned_destination_location.rb +2 -4
- data/lib/comet/models/spanned_storage_extra_info.rb +2 -4
- data/lib/comet/models/sshconnection.rb +2 -4
- data/lib/comet/models/stat_result.rb +2 -4
- data/lib/comet/models/storage_free_space_info.rb +2 -4
- data/lib/{models/constellation_status_apiresponse.rb → comet/models/storage_role_options.rb} +35 -39
- data/lib/comet/models/storage_vault_provider_policy.rb +2 -4
- data/lib/comet/models/stored_object.rb +2 -4
- data/lib/comet/models/streamable_event.rb +2 -4
- data/lib/comet/models/swift_destination_location.rb +2 -4
- data/lib/comet/models/test_response.rb +2 -4
- data/lib/comet/models/totp_regenerated_response.rb +2 -4
- data/lib/comet/models/u2fregister_request.rb +2 -4
- data/lib/comet/models/u2fregistered_key.rb +2 -4
- data/lib/comet/models/u2fregistration_challenge_response.rb +2 -4
- data/lib/comet/models/u2fsign_request.rb +2 -4
- data/lib/comet/models/u2fsign_response.rb +2 -4
- data/lib/comet/models/uninstall_config.rb +2 -4
- data/lib/comet/models/update_campaign_device_status.rb +2 -4
- data/lib/comet/models/update_campaign_options.rb +4 -6
- data/lib/comet/models/update_campaign_properties.rb +2 -4
- data/lib/comet/models/update_campaign_status.rb +2 -4
- data/lib/comet/models/update_campaign_status_device_entry.rb +2 -4
- data/lib/comet/models/user_custom_email_settings.rb +2 -4
- data/lib/comet/models/user_on_server.rb +2 -4
- data/lib/comet/models/user_policy.rb +13 -4
- data/lib/comet/models/user_profile_config.rb +12 -4
- data/lib/comet/models/user_profile_fragment.rb +2 -4
- data/lib/{models/user_profile_fragment.rb → comet/models/user_server_config.rb} +13 -13
- data/lib/comet/models/vault_snapshot.rb +2 -4
- data/lib/comet/models/vmdksnapshot_view_options.rb +2 -4
- data/lib/comet/models/vsscomponent.rb +2 -4
- data/lib/comet/models/vsswriter_info.rb +2 -4
- data/lib/comet/models/wasabi_virtual_storage_role_settings.rb +2 -4
- data/lib/comet/models/web_authn_authenticator_selection.rb +2 -4
- data/lib/comet/models/web_authn_credential.rb +2 -4
- data/lib/comet/models/web_authn_credential_assertion.rb +2 -4
- data/lib/comet/models/web_authn_credential_descriptor.rb +2 -4
- data/lib/comet/models/web_authn_credential_entity.rb +2 -4
- data/lib/comet/models/web_authn_credential_parameter.rb +2 -4
- data/lib/comet/models/web_authn_public_key_credential_creation_options.rb +2 -4
- data/lib/comet/models/web_authn_public_key_credential_request_options.rb +2 -4
- data/lib/comet/models/web_authn_registration_challenge_response.rb +2 -4
- data/lib/comet/models/web_authn_relying_party_entity.rb +2 -4
- data/lib/comet/models/web_authn_sign_request.rb +2 -4
- data/lib/comet/models/web_authn_sign_response.rb +2 -4
- data/lib/comet/models/web_authn_user_entity.rb +2 -4
- data/lib/comet/models/web_interface_branding_properties.rb +2 -4
- data/lib/comet/models/webhook_option.rb +2 -4
- data/lib/comet/models/win_smbauth.rb +2 -4
- data/lib/comet/models/windows_code_sign_properties.rb +2 -4
- data/lib/comet_backup_ruby_sdk.rb +21 -4
- metadata +21 -171
- data/lib/api_response_error.rb +0 -27
- data/lib/comet_server.rb +0 -3785
- data/lib/definitions.rb +0 -710
- data/lib/models/add_bucket_response_message.rb +0 -102
- data/lib/models/admin_account_properties_response.rb +0 -91
- data/lib/models/admin_email_options.rb +0 -84
- data/lib/models/admin_resource_response.rb +0 -93
- data/lib/models/admin_security_options.rb +0 -177
- data/lib/models/admin_u2fregistration.rb +0 -93
- data/lib/models/admin_user_permissions.rb +0 -106
- data/lib/models/admin_web_authn_registration.rb +0 -121
- data/lib/models/allowed_admin_user.rb +0 -214
- data/lib/models/available_download.rb +0 -90
- data/lib/models/azure_destination_location.rb +0 -111
- data/lib/models/b2destination_location.rb +0 -130
- data/lib/models/b2storage_extra_info.rb +0 -81
- data/lib/models/b2transaction_totals.rb +0 -93
- data/lib/models/b2virtual_storage_role_settings.rb +0 -99
- data/lib/models/backup_job_advanced_options.rb +0 -117
- data/lib/models/backup_job_detail.rb +0 -328
- data/lib/models/backup_job_progress.rb +0 -111
- data/lib/models/backup_rule_config.rb +0 -233
- data/lib/models/backup_rule_event_triggers.rb +0 -82
- data/lib/models/branding_options.rb +0 -335
- data/lib/models/branding_properties.rb +0 -293
- data/lib/models/browse_disk_drives_response.rb +0 -99
- data/lib/models/browse_edbresponse.rb +0 -99
- data/lib/models/browse_hvresponse.rb +0 -99
- data/lib/models/browse_office_365list_virtual_accounts_response.rb +0 -99
- data/lib/models/browse_office_365objects_response.rb +0 -99
- data/lib/models/browse_sqlserver_response.rb +0 -100
- data/lib/models/browse_vssresponse.rb +0 -99
- data/lib/models/bucket_properties.rb +0 -110
- data/lib/models/bucket_usage_info.rb +0 -97
- data/lib/models/comet_destination_location.rb +0 -93
- data/lib/models/constellation_check_report.rb +0 -99
- data/lib/models/constellation_stats.rb +0 -102
- data/lib/models/content_measurement.rb +0 -99
- data/lib/models/content_measurement_component.rb +0 -91
- data/lib/models/create_group_policy_response.rb +0 -93
- data/lib/models/days_of_week_config.rb +0 -108
- data/lib/models/default_email_report_policy.rb +0 -87
- data/lib/models/default_source_with_osrestriction.rb +0 -83
- data/lib/models/destination_config.rb +0 -562
- data/lib/models/destination_location.rb +0 -421
- data/lib/models/destination_statistics.rb +0 -115
- data/lib/models/device_config.rb +0 -124
- data/lib/models/disk_drive.rb +0 -180
- data/lib/models/dispatcher_admin_sources_response.rb +0 -100
- data/lib/models/dispatcher_stored_objects_response.rb +0 -99
- data/lib/models/dispatcher_vault_snapshots_response.rb +0 -99
- data/lib/models/dispatcher_windisk_snapshot_response.rb +0 -99
- data/lib/models/edbfile_info.rb +0 -99
- data/lib/models/email_options.rb +0 -153
- data/lib/models/email_report_config.rb +0 -98
- data/lib/models/email_report_generated_preview.rb +0 -136
- data/lib/models/external_ldapauthentication_source_settings.rb +0 -135
- data/lib/models/extra_file_exclusion.rb +0 -90
- data/lib/models/ftpdestination_location.rb +0 -141
- data/lib/models/get_group_policy_response.rb +0 -101
- data/lib/models/get_profile_and_hash_response_message.rb +0 -101
- data/lib/models/group_policy.rb +0 -98
- data/lib/models/hour_sched_config.rb +0 -84
- data/lib/models/hyper_vmachine_info.rb +0 -84
- data/lib/models/install_creds.rb +0 -99
- data/lib/models/install_token.rb +0 -117
- data/lib/models/install_token_response.rb +0 -92
- data/lib/models/job_entry.rb +0 -94
- data/lib/models/live_user_connection.rb +0 -149
- data/lib/models/local_destination_location.rb +0 -102
- data/lib/models/mac_oscode_sign_properties.rb +0 -197
- data/lib/models/mongo_dbconnection.rb +0 -230
- data/lib/models/mssqlconnection.rb +0 -120
- data/lib/models/new_bucket_detail.rb +0 -84
- data/lib/models/news_entry.rb +0 -93
- data/lib/models/office_365connection.rb +0 -131
- data/lib/models/office_365credential.rb +0 -111
- data/lib/models/office_365custom_setting.rb +0 -133
- data/lib/models/office_365custom_setting_v2.rb +0 -108
- data/lib/models/office_365mixed_virtual_account.rb +0 -211
- data/lib/models/office_365object_info.rb +0 -118
- data/lib/models/organization.rb +0 -151
- data/lib/models/organization_response.rb +0 -101
- data/lib/models/osinfo.rb +0 -99
- data/lib/models/partition.rb +0 -172
- data/lib/models/private_branding_properties.rb +0 -227
- data/lib/models/protected_item_engine_type_policy.rb +0 -88
- data/lib/models/public_branding_properties.rb +0 -132
- data/lib/models/register_office_application_begin_response.rb +0 -93
- data/lib/models/register_office_application_check_response.rb +0 -100
- data/lib/models/replicator_state_apiresponse.rb +0 -174
- data/lib/models/request_storage_vault_response_message.rb +0 -93
- data/lib/models/restore_job_advanced_options.rb +0 -131
- data/lib/models/retention_policy.rb +0 -90
- data/lib/models/retention_range.rb +0 -138
- data/lib/models/s3destination_location.rb +0 -123
- data/lib/models/schedule_config.rb +0 -131
- data/lib/models/search_clause.rb +0 -119
- data/lib/models/self_backup_statistics.rb +0 -108
- data/lib/models/server_config_options_software_build_role_fragment.rb +0 -74
- data/lib/models/server_meta_branding_properties.rb +0 -144
- data/lib/models/server_meta_version_info.rb +0 -261
- data/lib/models/session_key_regenerated_response.rb +0 -102
- data/lib/models/sftpdestination_location.rb +0 -135
- data/lib/models/size_measurement.rb +0 -93
- data/lib/models/software_update_news_response.rb +0 -109
- data/lib/models/source_basic_info.rb +0 -101
- data/lib/models/source_config.rb +0 -202
- data/lib/models/source_include_pattern.rb +0 -84
- data/lib/models/source_statistics.rb +0 -82
- data/lib/models/spanned_destination_location.rb +0 -87
- data/lib/models/sshconnection.rb +0 -126
- data/lib/models/stat_result.rb +0 -111
- data/lib/models/storage_free_space_info.rb +0 -110
- data/lib/models/storage_vault_provider_policy.rb +0 -88
- data/lib/models/stored_object.rb +0 -238
- data/lib/models/streamable_event.rb +0 -92
- data/lib/models/swift_destination_location.rb +0 -209
- data/lib/models/test_response.rb +0 -90
- data/lib/models/totp_regenerated_response.rb +0 -111
- data/lib/models/u2fregister_request.rb +0 -85
- data/lib/models/u2fregistered_key.rb +0 -94
- data/lib/models/u2fregistration_challenge_response.rb +0 -133
- data/lib/models/u2fsign_request.rb +0 -109
- data/lib/models/u2fsign_response.rb +0 -103
- data/lib/models/uninstall_config.rb +0 -78
- data/lib/models/update_campaign_options.rb +0 -113
- data/lib/models/update_campaign_properties.rb +0 -128
- data/lib/models/update_campaign_status.rb +0 -143
- data/lib/models/update_campaign_status_device_entry.rb +0 -93
- data/lib/models/user_on_server.rb +0 -84
- data/lib/models/user_policy.rb +0 -339
- data/lib/models/user_profile_config.rb +0 -349
- data/lib/models/vault_snapshot.rb +0 -99
- data/lib/models/vmdksnapshot_view_options.rb +0 -90
- data/lib/models/vsscomponent.rb +0 -99
- data/lib/models/vsswriter_info.rb +0 -90
- data/lib/models/web_authn_authenticator_selection.rb +0 -96
- data/lib/models/web_authn_credential.rb +0 -105
- data/lib/models/web_authn_credential_assertion.rb +0 -74
- data/lib/models/web_authn_credential_descriptor.rb +0 -101
- data/lib/models/web_authn_credential_parameter.rb +0 -84
- data/lib/models/web_authn_public_key_credential_creation_options.rb +0 -172
- data/lib/models/web_authn_public_key_credential_request_options.rb +0 -140
- data/lib/models/web_authn_registration_challenge_response.rb +0 -101
- data/lib/models/web_authn_relying_party_entity.rb +0 -95
- data/lib/models/web_authn_sign_request.rb +0 -83
- data/lib/models/web_authn_sign_response.rb +0 -84
- data/lib/models/web_authn_user_entity.rb +0 -105
- data/lib/models/web_interface_branding_properties.rb +0 -108
- data/lib/models/webhook_option.rb +0 -107
- data/lib/models/win_smbauth.rb +0 -102
- data/lib/models/windows_code_sign_properties.rb +0 -147
data/lib/models/user_policy.rb
DELETED
@@ -1,339 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby --enable-frozen-string-literal
|
2
|
-
#
|
3
|
-
# Copyright (c) 2020-2022 Comet Licensing Ltd.
|
4
|
-
# Please see the LICENSE file for usage information.
|
5
|
-
#
|
6
|
-
# SPDX-License-Identifier: MIT
|
7
|
-
#
|
8
|
-
# frozen_string_literal: true
|
9
|
-
|
10
|
-
require 'json'
|
11
|
-
|
12
|
-
module Comet
|
13
|
-
|
14
|
-
# UserPolicy is a typed class wrapper around the underlying Comet Server API data structure.
|
15
|
-
class UserPolicy
|
16
|
-
|
17
|
-
# @type [Boolean] prevent_request_storage_vault
|
18
|
-
attr_accessor :prevent_request_storage_vault
|
19
|
-
|
20
|
-
# @type [Boolean] prevent_add_custom_storage_vault
|
21
|
-
attr_accessor :prevent_add_custom_storage_vault
|
22
|
-
|
23
|
-
# @type [Boolean] prevent_edit_storage_vault
|
24
|
-
attr_accessor :prevent_edit_storage_vault
|
25
|
-
|
26
|
-
# @type [Boolean] hide_cloud_storage_branding
|
27
|
-
attr_accessor :hide_cloud_storage_branding
|
28
|
-
|
29
|
-
# @type [Boolean] prevent_delete_storage_vault
|
30
|
-
attr_accessor :prevent_delete_storage_vault
|
31
|
-
|
32
|
-
# @type [Comet::StorageVaultProviderPolicy] storage_vault_providers
|
33
|
-
attr_accessor :storage_vault_providers
|
34
|
-
|
35
|
-
# @type [Boolean] prevent_new_protected_item
|
36
|
-
attr_accessor :prevent_new_protected_item
|
37
|
-
|
38
|
-
# @type [Boolean] prevent_edit_protected_item
|
39
|
-
attr_accessor :prevent_edit_protected_item
|
40
|
-
|
41
|
-
# @type [Boolean] prevent_delete_protected_item
|
42
|
-
attr_accessor :prevent_delete_protected_item
|
43
|
-
|
44
|
-
# @type [Comet::ProtectedItemEngineTypePolicy] protected_item_engine_types
|
45
|
-
attr_accessor :protected_item_engine_types
|
46
|
-
|
47
|
-
# @type [Array<Comet::ExtraFileExclusion>] file_and_folder_mandatory_exclusions
|
48
|
-
attr_accessor :file_and_folder_mandatory_exclusions
|
49
|
-
|
50
|
-
# @type [Number] mode_schedule_skip_already_running
|
51
|
-
attr_accessor :mode_schedule_skip_already_running
|
52
|
-
|
53
|
-
# @type [Number] mode_admin_reset_password
|
54
|
-
attr_accessor :mode_admin_reset_password
|
55
|
-
|
56
|
-
# @type [Number] mode_admin_view_filenames
|
57
|
-
attr_accessor :mode_admin_view_filenames
|
58
|
-
|
59
|
-
# @type [Number] mode_require_user_reset_password
|
60
|
-
attr_accessor :mode_require_user_reset_password
|
61
|
-
|
62
|
-
# @type [Boolean] prevent_delete_single_snapshots
|
63
|
-
attr_accessor :prevent_delete_single_snapshots
|
64
|
-
|
65
|
-
# @type [Boolean] prevent_change_account_password
|
66
|
-
attr_accessor :prevent_change_account_password
|
67
|
-
|
68
|
-
# @type [Boolean] prevent_change_email_settings
|
69
|
-
attr_accessor :prevent_change_email_settings
|
70
|
-
|
71
|
-
# @type [Boolean] prevent_change_account_name
|
72
|
-
attr_accessor :prevent_change_account_name
|
73
|
-
|
74
|
-
# @type [Boolean] prevent_open_app_ui
|
75
|
-
attr_accessor :prevent_open_app_ui
|
76
|
-
|
77
|
-
# @type [Boolean] require_password_open_app_ui
|
78
|
-
attr_accessor :require_password_open_app_ui
|
79
|
-
|
80
|
-
# @type [Boolean] hide_app_import
|
81
|
-
attr_accessor :hide_app_import
|
82
|
-
|
83
|
-
# @type [Boolean] hide_app_version
|
84
|
-
attr_accessor :hide_app_version
|
85
|
-
|
86
|
-
# @type [Boolean] prevent_open_web_ui
|
87
|
-
attr_accessor :prevent_open_web_ui
|
88
|
-
|
89
|
-
# @type [Boolean] prevent_view_device_names
|
90
|
-
attr_accessor :prevent_view_device_names
|
91
|
-
|
92
|
-
# @type [Comet::DefaultEmailReportPolicy] default_email_reports
|
93
|
-
attr_accessor :default_email_reports
|
94
|
-
|
95
|
-
# @type [Comet::RetentionPolicy] default_storage_vault_retention
|
96
|
-
attr_accessor :default_storage_vault_retention
|
97
|
-
|
98
|
-
# @type [Boolean] enforce_storage_vault_retention
|
99
|
-
attr_accessor :enforce_storage_vault_retention
|
100
|
-
|
101
|
-
# @type [Boolean] prevent_protected_item_retention
|
102
|
-
attr_accessor :prevent_protected_item_retention
|
103
|
-
|
104
|
-
# @type [Hash{String => Comet::SourceConfig}] default_sources
|
105
|
-
attr_accessor :default_sources
|
106
|
-
|
107
|
-
# @type [Hash{String => Comet::BackupRuleConfig}] default_sources_backup_rules
|
108
|
-
attr_accessor :default_sources_backup_rules
|
109
|
-
|
110
|
-
# @type [Hash{String => Comet::DefaultSourceWithOSRestriction}] default_sources_with_osrestriction
|
111
|
-
attr_accessor :default_sources_with_osrestriction
|
112
|
-
|
113
|
-
# @type [Hash{String => Comet::BackupRuleConfig}] default_backup_rules
|
114
|
-
attr_accessor :default_backup_rules
|
115
|
-
|
116
|
-
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
117
|
-
attr_accessor :unknown_json_fields
|
118
|
-
|
119
|
-
def initialize
|
120
|
-
clear
|
121
|
-
end
|
122
|
-
|
123
|
-
def clear
|
124
|
-
@storage_vault_providers = Comet::StorageVaultProviderPolicy.new
|
125
|
-
@protected_item_engine_types = Comet::ProtectedItemEngineTypePolicy.new
|
126
|
-
@file_and_folder_mandatory_exclusions = []
|
127
|
-
@mode_schedule_skip_already_running = 0
|
128
|
-
@mode_admin_reset_password = 0
|
129
|
-
@mode_admin_view_filenames = 0
|
130
|
-
@mode_require_user_reset_password = 0
|
131
|
-
@default_email_reports = Comet::DefaultEmailReportPolicy.new
|
132
|
-
@default_storage_vault_retention = Comet::RetentionPolicy.new
|
133
|
-
@default_sources = {}
|
134
|
-
@default_sources_backup_rules = {}
|
135
|
-
@default_sources_with_osrestriction = {}
|
136
|
-
@default_backup_rules = {}
|
137
|
-
@unknown_json_fields = {}
|
138
|
-
end
|
139
|
-
|
140
|
-
# @param [String] json_string The complete object in JSON format
|
141
|
-
def from_json(json_string)
|
142
|
-
raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
143
|
-
|
144
|
-
from_hash(JSON.parse(json_string))
|
145
|
-
end
|
146
|
-
|
147
|
-
# @param [Hash] obj The complete object as a Ruby hash
|
148
|
-
def from_hash(obj)
|
149
|
-
raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
150
|
-
|
151
|
-
obj.each do |k, v|
|
152
|
-
case k
|
153
|
-
when 'PreventRequestStorageVault'
|
154
|
-
@prevent_request_storage_vault = v
|
155
|
-
when 'PreventAddCustomStorageVault'
|
156
|
-
@prevent_add_custom_storage_vault = v
|
157
|
-
when 'PreventEditStorageVault'
|
158
|
-
@prevent_edit_storage_vault = v
|
159
|
-
when 'HideCloudStorageBranding'
|
160
|
-
@hide_cloud_storage_branding = v
|
161
|
-
when 'PreventDeleteStorageVault'
|
162
|
-
@prevent_delete_storage_vault = v
|
163
|
-
when 'StorageVaultProviders'
|
164
|
-
@storage_vault_providers = Comet::StorageVaultProviderPolicy.new
|
165
|
-
@storage_vault_providers.from_hash(v)
|
166
|
-
when 'PreventNewProtectedItem'
|
167
|
-
@prevent_new_protected_item = v
|
168
|
-
when 'PreventEditProtectedItem'
|
169
|
-
@prevent_edit_protected_item = v
|
170
|
-
when 'PreventDeleteProtectedItem'
|
171
|
-
@prevent_delete_protected_item = v
|
172
|
-
when 'ProtectedItemEngineTypes'
|
173
|
-
@protected_item_engine_types = Comet::ProtectedItemEngineTypePolicy.new
|
174
|
-
@protected_item_engine_types.from_hash(v)
|
175
|
-
when 'FileAndFolderMandatoryExclusions'
|
176
|
-
if v.nil?
|
177
|
-
@file_and_folder_mandatory_exclusions = []
|
178
|
-
else
|
179
|
-
@file_and_folder_mandatory_exclusions = Array.new(v.length)
|
180
|
-
v.each_with_index do |v1, i1|
|
181
|
-
@file_and_folder_mandatory_exclusions[i1] = Comet::ExtraFileExclusion.new
|
182
|
-
@file_and_folder_mandatory_exclusions[i1].from_hash(v1)
|
183
|
-
end
|
184
|
-
end
|
185
|
-
when 'ModeScheduleSkipAlreadyRunning'
|
186
|
-
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
187
|
-
|
188
|
-
@mode_schedule_skip_already_running = v
|
189
|
-
when 'ModeAdminResetPassword'
|
190
|
-
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
191
|
-
|
192
|
-
@mode_admin_reset_password = v
|
193
|
-
when 'ModeAdminViewFilenames'
|
194
|
-
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
195
|
-
|
196
|
-
@mode_admin_view_filenames = v
|
197
|
-
when 'ModeRequireUserResetPassword'
|
198
|
-
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
199
|
-
|
200
|
-
@mode_require_user_reset_password = v
|
201
|
-
when 'PreventDeleteSingleSnapshots'
|
202
|
-
@prevent_delete_single_snapshots = v
|
203
|
-
when 'PreventChangeAccountPassword'
|
204
|
-
@prevent_change_account_password = v
|
205
|
-
when 'PreventChangeEmailSettings'
|
206
|
-
@prevent_change_email_settings = v
|
207
|
-
when 'PreventChangeAccountName'
|
208
|
-
@prevent_change_account_name = v
|
209
|
-
when 'PreventOpenAppUI'
|
210
|
-
@prevent_open_app_ui = v
|
211
|
-
when 'RequirePasswordOpenAppUI'
|
212
|
-
@require_password_open_app_ui = v
|
213
|
-
when 'HideAppImport'
|
214
|
-
@hide_app_import = v
|
215
|
-
when 'HideAppVersion'
|
216
|
-
@hide_app_version = v
|
217
|
-
when 'PreventOpenWebUI'
|
218
|
-
@prevent_open_web_ui = v
|
219
|
-
when 'PreventViewDeviceNames'
|
220
|
-
@prevent_view_device_names = v
|
221
|
-
when 'DefaultEmailReports'
|
222
|
-
@default_email_reports = Comet::DefaultEmailReportPolicy.new
|
223
|
-
@default_email_reports.from_hash(v)
|
224
|
-
when 'DefaultStorageVaultRetention'
|
225
|
-
@default_storage_vault_retention = Comet::RetentionPolicy.new
|
226
|
-
@default_storage_vault_retention.from_hash(v)
|
227
|
-
when 'EnforceStorageVaultRetention'
|
228
|
-
@enforce_storage_vault_retention = v
|
229
|
-
when 'PreventProtectedItemRetention'
|
230
|
-
@prevent_protected_item_retention = v
|
231
|
-
when 'DefaultSources'
|
232
|
-
@default_sources = {}
|
233
|
-
if v.nil?
|
234
|
-
@default_sources = {}
|
235
|
-
else
|
236
|
-
v.each do |k1, v1|
|
237
|
-
@default_sources[k1] = Comet::SourceConfig.new
|
238
|
-
@default_sources[k1].from_hash(v1)
|
239
|
-
end
|
240
|
-
end
|
241
|
-
when 'DefaultSourcesBackupRules'
|
242
|
-
@default_sources_backup_rules = {}
|
243
|
-
if v.nil?
|
244
|
-
@default_sources_backup_rules = {}
|
245
|
-
else
|
246
|
-
v.each do |k1, v1|
|
247
|
-
@default_sources_backup_rules[k1] = Comet::BackupRuleConfig.new
|
248
|
-
@default_sources_backup_rules[k1].from_hash(v1)
|
249
|
-
end
|
250
|
-
end
|
251
|
-
when 'DefaultSourcesWithOSRestriction'
|
252
|
-
@default_sources_with_osrestriction = {}
|
253
|
-
if v.nil?
|
254
|
-
@default_sources_with_osrestriction = {}
|
255
|
-
else
|
256
|
-
v.each do |k1, v1|
|
257
|
-
@default_sources_with_osrestriction[k1] = Comet::DefaultSourceWithOSRestriction.new
|
258
|
-
@default_sources_with_osrestriction[k1].from_hash(v1)
|
259
|
-
end
|
260
|
-
end
|
261
|
-
when 'DefaultBackupRules'
|
262
|
-
@default_backup_rules = {}
|
263
|
-
if v.nil?
|
264
|
-
@default_backup_rules = {}
|
265
|
-
else
|
266
|
-
v.each do |k1, v1|
|
267
|
-
@default_backup_rules[k1] = Comet::BackupRuleConfig.new
|
268
|
-
@default_backup_rules[k1].from_hash(v1)
|
269
|
-
end
|
270
|
-
end
|
271
|
-
else
|
272
|
-
@unknown_json_fields[k] = v
|
273
|
-
end
|
274
|
-
end
|
275
|
-
end
|
276
|
-
|
277
|
-
# @return [Hash] The complete object as a Ruby hash
|
278
|
-
def to_hash
|
279
|
-
ret = {}
|
280
|
-
ret['PreventRequestStorageVault'] = @prevent_request_storage_vault
|
281
|
-
ret['PreventAddCustomStorageVault'] = @prevent_add_custom_storage_vault
|
282
|
-
ret['PreventEditStorageVault'] = @prevent_edit_storage_vault
|
283
|
-
ret['HideCloudStorageBranding'] = @hide_cloud_storage_branding
|
284
|
-
ret['PreventDeleteStorageVault'] = @prevent_delete_storage_vault
|
285
|
-
ret['StorageVaultProviders'] = @storage_vault_providers
|
286
|
-
ret['PreventNewProtectedItem'] = @prevent_new_protected_item
|
287
|
-
ret['PreventEditProtectedItem'] = @prevent_edit_protected_item
|
288
|
-
ret['PreventDeleteProtectedItem'] = @prevent_delete_protected_item
|
289
|
-
ret['ProtectedItemEngineTypes'] = @protected_item_engine_types
|
290
|
-
unless @file_and_folder_mandatory_exclusions.nil?
|
291
|
-
ret['FileAndFolderMandatoryExclusions'] = @file_and_folder_mandatory_exclusions
|
292
|
-
end
|
293
|
-
unless @mode_schedule_skip_already_running.nil?
|
294
|
-
ret['ModeScheduleSkipAlreadyRunning'] = @mode_schedule_skip_already_running
|
295
|
-
end
|
296
|
-
unless @mode_admin_reset_password.nil?
|
297
|
-
ret['ModeAdminResetPassword'] = @mode_admin_reset_password
|
298
|
-
end
|
299
|
-
unless @mode_admin_view_filenames.nil?
|
300
|
-
ret['ModeAdminViewFilenames'] = @mode_admin_view_filenames
|
301
|
-
end
|
302
|
-
unless @mode_require_user_reset_password.nil?
|
303
|
-
ret['ModeRequireUserResetPassword'] = @mode_require_user_reset_password
|
304
|
-
end
|
305
|
-
ret['PreventDeleteSingleSnapshots'] = @prevent_delete_single_snapshots
|
306
|
-
ret['PreventChangeAccountPassword'] = @prevent_change_account_password
|
307
|
-
ret['PreventChangeEmailSettings'] = @prevent_change_email_settings
|
308
|
-
ret['PreventChangeAccountName'] = @prevent_change_account_name
|
309
|
-
ret['PreventOpenAppUI'] = @prevent_open_app_ui
|
310
|
-
ret['RequirePasswordOpenAppUI'] = @require_password_open_app_ui
|
311
|
-
ret['HideAppImport'] = @hide_app_import
|
312
|
-
ret['HideAppVersion'] = @hide_app_version
|
313
|
-
ret['PreventOpenWebUI'] = @prevent_open_web_ui
|
314
|
-
ret['PreventViewDeviceNames'] = @prevent_view_device_names
|
315
|
-
ret['DefaultEmailReports'] = @default_email_reports
|
316
|
-
ret['DefaultStorageVaultRetention'] = @default_storage_vault_retention
|
317
|
-
ret['EnforceStorageVaultRetention'] = @enforce_storage_vault_retention
|
318
|
-
ret['PreventProtectedItemRetention'] = @prevent_protected_item_retention
|
319
|
-
ret['DefaultSources'] = @default_sources
|
320
|
-
ret['DefaultSourcesBackupRules'] = @default_sources_backup_rules
|
321
|
-
ret['DefaultSourcesWithOSRestriction'] = @default_sources_with_osrestriction
|
322
|
-
ret['DefaultBackupRules'] = @default_backup_rules
|
323
|
-
@unknown_json_fields.each do |k, v|
|
324
|
-
ret[k] = v
|
325
|
-
end
|
326
|
-
ret
|
327
|
-
end
|
328
|
-
|
329
|
-
# @return [Hash] The complete object as a Ruby hash
|
330
|
-
def to_h
|
331
|
-
to_hash
|
332
|
-
end
|
333
|
-
|
334
|
-
# @return [String] The complete object as a JSON string
|
335
|
-
def to_json(options = {})
|
336
|
-
to_hash.to_json(options)
|
337
|
-
end
|
338
|
-
end
|
339
|
-
end
|
@@ -1,349 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby --enable-frozen-string-literal
|
2
|
-
#
|
3
|
-
# Copyright (c) 2020-2022 Comet Licensing Ltd.
|
4
|
-
# Please see the LICENSE file for usage information.
|
5
|
-
#
|
6
|
-
# SPDX-License-Identifier: MIT
|
7
|
-
#
|
8
|
-
# frozen_string_literal: true
|
9
|
-
|
10
|
-
require 'json'
|
11
|
-
|
12
|
-
module Comet
|
13
|
-
|
14
|
-
# UserProfileConfig is a typed class wrapper around the underlying Comet Server API data structure.
|
15
|
-
# This is the main data structure for a user's profile.
|
16
|
-
class UserProfileConfig
|
17
|
-
|
18
|
-
# @type [String] username
|
19
|
-
attr_accessor :username
|
20
|
-
|
21
|
-
# @type [String] account_name
|
22
|
-
attr_accessor :account_name
|
23
|
-
|
24
|
-
# @type [String] local_timezone
|
25
|
-
attr_accessor :local_timezone
|
26
|
-
|
27
|
-
# @type [String] language_code
|
28
|
-
attr_accessor :language_code
|
29
|
-
|
30
|
-
# Tenant
|
31
|
-
# @type [String] organization_id
|
32
|
-
attr_accessor :organization_id
|
33
|
-
|
34
|
-
# @type [Array<String>] emails
|
35
|
-
attr_accessor :emails
|
36
|
-
|
37
|
-
# @type [Hash{String => Comet::UserCustomEmailSettings}] override_email_settings
|
38
|
-
attr_accessor :override_email_settings
|
39
|
-
|
40
|
-
# @type [Boolean] send_email_reports
|
41
|
-
attr_accessor :send_email_reports
|
42
|
-
|
43
|
-
# Storage Vaults
|
44
|
-
# @type [Hash{String => Comet::DestinationConfig}] destinations
|
45
|
-
attr_accessor :destinations
|
46
|
-
|
47
|
-
# Protected Items
|
48
|
-
# @type [Hash{String => Comet::SourceConfig}] sources
|
49
|
-
attr_accessor :sources
|
50
|
-
|
51
|
-
# @type [Hash{String => Comet::BackupRuleConfig}] backup_rules
|
52
|
-
attr_accessor :backup_rules
|
53
|
-
|
54
|
-
# @type [Hash{String => Comet::DeviceConfig}] devices
|
55
|
-
attr_accessor :devices
|
56
|
-
|
57
|
-
# @type [Boolean] is_suspended
|
58
|
-
attr_accessor :is_suspended
|
59
|
-
|
60
|
-
# @type [Boolean] all_protected_items_quota_enabled
|
61
|
-
attr_accessor :all_protected_items_quota_enabled
|
62
|
-
|
63
|
-
# @type [Number] all_protected_items_quota_bytes
|
64
|
-
attr_accessor :all_protected_items_quota_bytes
|
65
|
-
|
66
|
-
# @type [Number] maximum_devices
|
67
|
-
attr_accessor :maximum_devices
|
68
|
-
|
69
|
-
# If the PolicyID field is set to a non-empty string, the Comet Server will enforce the contents of
|
70
|
-
# the Policy field based on the matching server's policy. Otherwise if the PolicyID field is set to an
|
71
|
-
# empty string, the administrator may configure any custom values in the Policy field.
|
72
|
-
# @type [String] policy_id
|
73
|
-
attr_accessor :policy_id
|
74
|
-
|
75
|
-
# @type [Comet::UserPolicy] policy
|
76
|
-
attr_accessor :policy
|
77
|
-
|
78
|
-
# To change the user's password, use the AdminResetUserPassword API instead of accessing these fields
|
79
|
-
# directly. Otherwise, other encrypted fields in the user profile may become corrupted.
|
80
|
-
# @type [Number] password_format
|
81
|
-
attr_accessor :password_format
|
82
|
-
|
83
|
-
# @type [String] password_hash
|
84
|
-
attr_accessor :password_hash
|
85
|
-
|
86
|
-
# @type [String] password_recovery
|
87
|
-
attr_accessor :password_recovery
|
88
|
-
|
89
|
-
# @type [Boolean] allow_password_login
|
90
|
-
attr_accessor :allow_password_login
|
91
|
-
|
92
|
-
# @type [Boolean] allow_password_and_totplogin
|
93
|
-
attr_accessor :allow_password_and_totplogin
|
94
|
-
|
95
|
-
# @type [Number] totpkey_encryption_format
|
96
|
-
attr_accessor :totpkey_encryption_format
|
97
|
-
|
98
|
-
# @type [String] totpkey
|
99
|
-
attr_accessor :totpkey
|
100
|
-
|
101
|
-
# @type [Boolean] require_password_change
|
102
|
-
attr_accessor :require_password_change
|
103
|
-
|
104
|
-
# @type [Number] create_time
|
105
|
-
attr_accessor :create_time
|
106
|
-
|
107
|
-
# @type [String] creation_guid
|
108
|
-
attr_accessor :creation_guid
|
109
|
-
|
110
|
-
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
111
|
-
attr_accessor :unknown_json_fields
|
112
|
-
|
113
|
-
def initialize
|
114
|
-
clear
|
115
|
-
end
|
116
|
-
|
117
|
-
def clear
|
118
|
-
@username = ''
|
119
|
-
@account_name = ''
|
120
|
-
@local_timezone = ''
|
121
|
-
@language_code = ''
|
122
|
-
@organization_id = ''
|
123
|
-
@emails = []
|
124
|
-
@override_email_settings = {}
|
125
|
-
@destinations = {}
|
126
|
-
@sources = {}
|
127
|
-
@backup_rules = {}
|
128
|
-
@devices = {}
|
129
|
-
@all_protected_items_quota_bytes = 0
|
130
|
-
@maximum_devices = 0
|
131
|
-
@policy_id = ''
|
132
|
-
@policy = Comet::UserPolicy.new
|
133
|
-
@password_format = 0
|
134
|
-
@password_hash = ''
|
135
|
-
@password_recovery = ''
|
136
|
-
@totpkey_encryption_format = 0
|
137
|
-
@totpkey = ''
|
138
|
-
@create_time = 0
|
139
|
-
@creation_guid = ''
|
140
|
-
@unknown_json_fields = {}
|
141
|
-
end
|
142
|
-
|
143
|
-
# @param [String] json_string The complete object in JSON format
|
144
|
-
def from_json(json_string)
|
145
|
-
raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
146
|
-
|
147
|
-
from_hash(JSON.parse(json_string))
|
148
|
-
end
|
149
|
-
|
150
|
-
# @param [Hash] obj The complete object as a Ruby hash
|
151
|
-
def from_hash(obj)
|
152
|
-
raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
153
|
-
|
154
|
-
obj.each do |k, v|
|
155
|
-
case k
|
156
|
-
when 'Username'
|
157
|
-
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
158
|
-
|
159
|
-
@username = v
|
160
|
-
when 'AccountName'
|
161
|
-
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
162
|
-
|
163
|
-
@account_name = v
|
164
|
-
when 'LocalTimezone'
|
165
|
-
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
166
|
-
|
167
|
-
@local_timezone = v
|
168
|
-
when 'LanguageCode'
|
169
|
-
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
170
|
-
|
171
|
-
@language_code = v
|
172
|
-
when 'OrganizationID'
|
173
|
-
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
174
|
-
|
175
|
-
@organization_id = v
|
176
|
-
when 'Emails'
|
177
|
-
if v.nil?
|
178
|
-
@emails = []
|
179
|
-
else
|
180
|
-
@emails = Array.new(v.length)
|
181
|
-
v.each_with_index do |v1, i1|
|
182
|
-
raise TypeError, "'v1' expected String, got #{v1.class}" unless v1.is_a? String
|
183
|
-
|
184
|
-
@emails[i1] = v1
|
185
|
-
end
|
186
|
-
end
|
187
|
-
when 'OverrideEmailSettings'
|
188
|
-
@override_email_settings = {}
|
189
|
-
if v.nil?
|
190
|
-
@override_email_settings = {}
|
191
|
-
else
|
192
|
-
v.each do |k1, v1|
|
193
|
-
@override_email_settings[k1] = Comet::UserCustomEmailSettings.new
|
194
|
-
@override_email_settings[k1].from_hash(v1)
|
195
|
-
end
|
196
|
-
end
|
197
|
-
when 'SendEmailReports'
|
198
|
-
@send_email_reports = v
|
199
|
-
when 'Destinations'
|
200
|
-
@destinations = {}
|
201
|
-
if v.nil?
|
202
|
-
@destinations = {}
|
203
|
-
else
|
204
|
-
v.each do |k1, v1|
|
205
|
-
@destinations[k1] = Comet::DestinationConfig.new
|
206
|
-
@destinations[k1].from_hash(v1)
|
207
|
-
end
|
208
|
-
end
|
209
|
-
when 'Sources'
|
210
|
-
@sources = {}
|
211
|
-
if v.nil?
|
212
|
-
@sources = {}
|
213
|
-
else
|
214
|
-
v.each do |k1, v1|
|
215
|
-
@sources[k1] = Comet::SourceConfig.new
|
216
|
-
@sources[k1].from_hash(v1)
|
217
|
-
end
|
218
|
-
end
|
219
|
-
when 'BackupRules'
|
220
|
-
@backup_rules = {}
|
221
|
-
if v.nil?
|
222
|
-
@backup_rules = {}
|
223
|
-
else
|
224
|
-
v.each do |k1, v1|
|
225
|
-
@backup_rules[k1] = Comet::BackupRuleConfig.new
|
226
|
-
@backup_rules[k1].from_hash(v1)
|
227
|
-
end
|
228
|
-
end
|
229
|
-
when 'Devices'
|
230
|
-
@devices = {}
|
231
|
-
if v.nil?
|
232
|
-
@devices = {}
|
233
|
-
else
|
234
|
-
v.each do |k1, v1|
|
235
|
-
@devices[k1] = Comet::DeviceConfig.new
|
236
|
-
@devices[k1].from_hash(v1)
|
237
|
-
end
|
238
|
-
end
|
239
|
-
when 'IsSuspended'
|
240
|
-
@is_suspended = v
|
241
|
-
when 'AllProtectedItemsQuotaEnabled'
|
242
|
-
@all_protected_items_quota_enabled = v
|
243
|
-
when 'AllProtectedItemsQuotaBytes'
|
244
|
-
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
245
|
-
|
246
|
-
@all_protected_items_quota_bytes = v
|
247
|
-
when 'MaximumDevices'
|
248
|
-
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
249
|
-
|
250
|
-
@maximum_devices = v
|
251
|
-
when 'PolicyID'
|
252
|
-
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
253
|
-
|
254
|
-
@policy_id = v
|
255
|
-
when 'Policy'
|
256
|
-
@policy = Comet::UserPolicy.new
|
257
|
-
@policy.from_hash(v)
|
258
|
-
when 'PasswordFormat'
|
259
|
-
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
260
|
-
|
261
|
-
@password_format = v
|
262
|
-
when 'PasswordHash'
|
263
|
-
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
264
|
-
|
265
|
-
@password_hash = v
|
266
|
-
when 'PasswordRecovery'
|
267
|
-
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
268
|
-
|
269
|
-
@password_recovery = v
|
270
|
-
when 'AllowPasswordLogin'
|
271
|
-
@allow_password_login = v
|
272
|
-
when 'AllowPasswordAndTOTPLogin'
|
273
|
-
@allow_password_and_totplogin = v
|
274
|
-
when 'TOTPKeyEncryptionFormat'
|
275
|
-
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
276
|
-
|
277
|
-
@totpkey_encryption_format = v
|
278
|
-
when 'TOTPKey'
|
279
|
-
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
280
|
-
|
281
|
-
@totpkey = v
|
282
|
-
when 'RequirePasswordChange'
|
283
|
-
@require_password_change = v
|
284
|
-
when 'CreateTime'
|
285
|
-
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
286
|
-
|
287
|
-
@create_time = v
|
288
|
-
when 'CreationGUID'
|
289
|
-
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
290
|
-
|
291
|
-
@creation_guid = v
|
292
|
-
else
|
293
|
-
@unknown_json_fields[k] = v
|
294
|
-
end
|
295
|
-
end
|
296
|
-
end
|
297
|
-
|
298
|
-
# @return [Hash] The complete object as a Ruby hash
|
299
|
-
def to_hash
|
300
|
-
ret = {}
|
301
|
-
ret['Username'] = @username
|
302
|
-
ret['AccountName'] = @account_name
|
303
|
-
ret['LocalTimezone'] = @local_timezone
|
304
|
-
ret['LanguageCode'] = @language_code
|
305
|
-
unless @organization_id.nil?
|
306
|
-
ret['OrganizationID'] = @organization_id
|
307
|
-
end
|
308
|
-
ret['Emails'] = @emails
|
309
|
-
ret['OverrideEmailSettings'] = @override_email_settings
|
310
|
-
ret['SendEmailReports'] = @send_email_reports
|
311
|
-
ret['Destinations'] = @destinations
|
312
|
-
ret['Sources'] = @sources
|
313
|
-
ret['BackupRules'] = @backup_rules
|
314
|
-
ret['Devices'] = @devices
|
315
|
-
ret['IsSuspended'] = @is_suspended
|
316
|
-
ret['AllProtectedItemsQuotaEnabled'] = @all_protected_items_quota_enabled
|
317
|
-
ret['AllProtectedItemsQuotaBytes'] = @all_protected_items_quota_bytes
|
318
|
-
ret['MaximumDevices'] = @maximum_devices
|
319
|
-
ret['PolicyID'] = @policy_id
|
320
|
-
ret['Policy'] = @policy
|
321
|
-
ret['PasswordFormat'] = @password_format
|
322
|
-
ret['PasswordHash'] = @password_hash
|
323
|
-
unless @password_recovery.nil?
|
324
|
-
ret['PasswordRecovery'] = @password_recovery
|
325
|
-
end
|
326
|
-
ret['AllowPasswordLogin'] = @allow_password_login
|
327
|
-
ret['AllowPasswordAndTOTPLogin'] = @allow_password_and_totplogin
|
328
|
-
ret['TOTPKeyEncryptionFormat'] = @totpkey_encryption_format
|
329
|
-
ret['TOTPKey'] = @totpkey
|
330
|
-
ret['RequirePasswordChange'] = @require_password_change
|
331
|
-
ret['CreateTime'] = @create_time
|
332
|
-
ret['CreationGUID'] = @creation_guid
|
333
|
-
@unknown_json_fields.each do |k, v|
|
334
|
-
ret[k] = v
|
335
|
-
end
|
336
|
-
ret
|
337
|
-
end
|
338
|
-
|
339
|
-
# @return [Hash] The complete object as a Ruby hash
|
340
|
-
def to_h
|
341
|
-
to_hash
|
342
|
-
end
|
343
|
-
|
344
|
-
# @return [String] The complete object as a JSON string
|
345
|
-
def to_json(options = {})
|
346
|
-
to_hash.to_json(options)
|
347
|
-
end
|
348
|
-
end
|
349
|
-
end
|