From 1be3eaf6e30e892f1702e7b1386c5b4a110990e4 Mon Sep 17 00:00:00 2001 From: Satwik Miyyapuram Date: Tue, 8 Oct 2024 11:09:58 +0530 Subject: [PATCH] go-sdk for 7.1.2_u2 --- README.md | 6 +- .../get_backup_job_runs_parameters.go | 140 ++ .../get_backup_jobs_summary_parameters.go | 71 + .../network/create_ip_config_parameters.go | 150 --- .../network/create_ip_config_responses.go | 187 --- .../network/delete_ip_config_parameters.go | 150 --- .../network/delete_ip_config_responses.go | 173 --- v1/client/network/network_client.go | 84 -- v1/client/packages/packages_client.go | 45 - .../packages/upload_package_parameters.go | 128 -- .../packages/upload_package_responses.go | 187 --- .../get_protection_jobs_parameters.go | 71 + .../get_protection_runs_parameters.go | 71 + v1/models/a_d_domain.go | 4 +- v1/models/additional_connector_params.go | 5 + v1/models/agent_certificate_information.go | 6 + v1/models/agent_deployment_status_response.go | 6 + v1/models/app_entity_backup_status_info.go | 2 +- v1/models/aws_protection_source.go | 51 + v1/models/backup_job_run_state_proto.go | 51 + v1/models/backup_script.go | 158 +-- v1/models/backup_script_full_backup_script.go | 99 -- ...backup_script_incremental_backup_script.go | 100 -- v1/models/backup_script_log_backup_script.go | 99 -- v1/models/backup_script_remote_host.go | 94 -- v1/models/bifrost_config.go | 39 +- v1/models/bifrost_config_subnet.go | 99 -- v1/models/blackout_period.go | 70 +- v1/models/blackout_period_end_time.go | 95 -- v1/models/blackout_period_start_time.go | 95 -- v1/models/cassandra_connect_params.go | 3 + v1/models/clone_task_request.go | 36 +- ...lone_task_request_clone_view_parameters.go | 96 -- v1/models/clone_view_request.go | 111 +- v1/models/clone_view_request_logical_quota.go | 107 -- v1/models/cluster.go | 76 +- ...ster_config_proto_vault_cloud_tier_info.go | 2 +- v1/models/cluster_eula_config.go | 95 -- v1/models/cluster_license_state.go | 95 -- v1/models/cluster_networking_endpoint.go | 3 + v1/models/cluster_stats.go | 149 +-- .../cluster_stats_cloud_usage_perf_stats.go | 96 -- .../cluster_stats_local_usage_perf_stats.go | 96 -- v1/models/cluster_stats_logical_stats.go | 98 -- v1/models/cluster_stats_usage_perf_stats.go | 97 -- v1/models/copy_run.go | 33 +- v1/models/copy_run_task_uid.go | 93 -- v1/models/create_ip_config_parameters.go | 138 -- v1/models/create_ip_config_result.go | 53 - ...te_remote_vault_restore_task_parameters.go | 35 +- ..._restore_task_parameters_search_job_uid.go | 95 -- v1/models/create_view_box_params.go | 127 +- ...ew_box_params_default_user_quota_policy.go | 94 -- ...ew_box_params_default_view_quota_policy.go | 104 -- .../create_view_box_params_physical_quota.go | 107 -- v1/models/create_view_request.go | 111 +- .../create_view_request_logical_quota.go | 107 -- .../created_remote_vault_search_job_uid.go | 33 +- ...ote_vault_search_job_uid_search_job_uid.go | 93 -- v1/models/delete_ip_config_parameters.go | 73 - v1/models/entity_identifiers.go | 65 + v1/models/entity_size_info.go | 2 +- v1/models/file_search_result.go | 34 +- v1/models/file_search_result_job_uid.go | 94 -- v1/models/filesystem_volume.go | 36 +- v1/models/filesystem_volume_logical_volume.go | 96 -- v1/models/get_registration_info_response.go | 34 +- .../get_registration_info_response_stats.go | 94 -- v1/models/index_and_snapshots.go | 72 +- .../index_and_snapshots_archive_task_uid.go | 96 -- ...and_snapshots_remote_protection_job_uid.go | 96 -- v1/models/mount_volume_result_details.go | 34 +- ...mount_volume_result_details_mount_error.go | 94 -- v1/models/mount_volumes_state.go | 35 +- v1/models/mount_volumes_state_other_error.go | 95 -- v1/models/network_mapping_proto.go | 59 +- v1/models/object_snapshot_info.go | 37 +- v1/models/object_snapshot_info_job_uid.go | 97 -- v1/models/object_string_identifier.go | 114 ++ v1/models/perform_restore_job_state_proto.go | 62 + v1/models/perform_restore_task_state_proto.go | 62 + v1/models/peristent_volume_status.go | 76 +- .../peristent_volume_status_capacity_entry.go | 53 + v1/models/physical_protection_source.go | 34 +- v1/models/physical_protection_source_id.go | 94 -- v1/models/private_agent_entity.go | 3 + v1/models/private_aws_entity.go | 51 + v1/models/private_s3_protection_params.go | 58 + v1/models/private_vmware_entity.go | 4 + v1/models/protected_vm_info.go | 33 +- v1/models/protected_vm_info_stats.go | 93 -- v1/models/protection_job.go | 258 +--- ...otection_job_full_protection_start_time.go | 99 -- ...n_job_incremental_protection_start_time.go | 99 -- .../protection_job_post_backup_script.go | 95 -- v1/models/protection_job_pre_backup_script.go | 96 -- v1/models/protection_job_remote_script.go | 95 -- v1/models/protection_job_request_body.go | 224 +--- ...request_body_full_protection_start_time.go | 99 -- ..._body_incremental_protection_start_time.go | 99 -- ...ion_job_request_body_post_backup_script.go | 95 -- ...tion_job_request_body_pre_backup_script.go | 96 -- ...otection_job_request_body_remote_script.go | 95 -- .../protection_job_request_body_start_time.go | 98 -- v1/models/protection_job_start_time.go | 98 -- v1/models/protection_job_uid.go | 94 -- v1/models/protection_object_summary.go | 33 +- ...ection_object_summary_protection_source.go | 93 -- v1/models/protection_policy.go | 128 +- ...rotection_policy_full_scheduling_policy.go | 97 -- ...on_policy_incremental_scheduling_policy.go | 97 -- v1/models/protection_policy_request.go | 128 +- ...n_policy_request_full_scheduling_policy.go | 97 -- ...y_request_incremental_scheduling_policy.go | 97 -- v1/models/protection_run_instance.go | 33 +- v1/models/protection_run_instance_job_uid.go | 93 -- v1/models/protection_source.go | 1187 ++++------------- ...tion_source_acropolis_protection_source.go | 94 -- .../protection_source_ad_protection_source.go | 94 -- ...protection_source_aws_protection_source.go | 94 -- ...otection_source_azure_protection_source.go | 94 -- ...tion_source_cassandra_protection_source.go | 94 -- ...tion_source_couchbase_protection_source.go | 94 -- ...ion_source_elastifile_protection_source.go | 94 -- ...ction_source_exchange_protection_source.go | 94 -- ...on_source_flash_blade_protection_source.go | 94 -- ...protection_source_gcp_protection_source.go | 94 -- ...rotection_source_gpfs_protection_source.go | 94 -- ...otection_source_hbase_protection_source.go | 94 -- ...rotection_source_hdfs_protection_source.go | 94 -- ...rotection_source_hive_protection_source.go | 94 -- ...ion_source_hyper_flex_protection_source.go | 94 -- ...tection_source_hyperv_protection_source.go | 94 -- ...urce_ibm_flash_system_protection_source.go | 94 -- ...tection_source_isilon_protection_source.go | 94 -- ...ion_source_kubernetes_protection_source.go | 94 -- ...protection_source_kvm_protection_source.go | 94 -- ...ection_source_mongodb_protection_source.go | 94 -- ...protection_source_nas_protection_source.go | 94 -- ...tection_source_netapp_protection_source.go | 94 -- ...tection_source_nimble_protection_source.go | 94 -- v1/models/protection_source_node.go | 70 +- ...rotection_source_node_protection_source.go | 93 -- ...rotection_source_node_registration_info.go | 95 -- ...tion_source_office365_protection_source.go | 94 -- ...tection_source_oracle_protection_source.go | 94 -- ...ction_source_physical_protection_source.go | 94 -- ...rotection_source_pure_protection_source.go | 94 -- ...rotection_source_sfdc_protection_source.go | 94 -- ...protection_source_sql_protection_source.go | 94 -- v1/models/protection_source_tree_info.go | 106 +- ...tion_source_tree_info_registration_info.go | 95 -- .../protection_source_tree_info_root_node.go | 94 -- .../protection_source_tree_info_stats.go | 93 -- ...protection_source_uda_protection_source.go | 94 -- ...rotection_source_view_protection_source.go | 94 -- ...ection_source_vm_ware_protection_source.go | 94 -- ...tection_sources_job_runs_report_element.go | 33 +- ...b_runs_report_element_protection_source.go | 93 -- v1/models/protection_sources_summary_stats.go | 35 +- ...sources_summary_stats_protection_source.go | 95 -- .../register_protection_source_parameters.go | 69 +- ...source_parameters_nas_mount_credentials.go | 96 -- ...ion_source_parameters_throttling_policy.go | 93 -- v1/models/registered_application_server.go | 75 +- ...d_application_server_application_server.go | 99 -- ...ion_server_registered_protection_source.go | 94 -- v1/models/registered_entity_o365_params.go | 2 +- v1/models/registered_source_info.go | 36 +- ...tered_source_info_nas_mount_credentials.go | 96 -- v1/models/remote_job_script.go | 158 +-- .../remote_job_script_full_backup_script.go | 99 -- ...te_job_script_incremental_backup_script.go | 100 -- .../remote_job_script_log_backup_script.go | 99 -- v1/models/remote_job_script_remote_host.go | 94 -- .../remote_protection_job_information.go | 37 +- ...mote_protection_job_information_job_uid.go | 97 -- .../remote_protection_job_run_information.go | 37 +- ..._protection_job_run_information_job_uid.go | 97 -- .../remote_protection_job_run_instance.go | 36 +- ...ction_job_run_instance_archive_task_uid.go | 96 -- v1/models/remote_restore_indexing_status.go | 35 +- ...store_indexing_status_indexing_task_uid.go | 95 -- v1/models/remote_restore_snapshot_status.go | 71 +- ...estore_snapshot_status_archive_task_uid.go | 96 -- ...store_snapshot_status_snapshot_task_uid.go | 95 -- v1/models/remote_vault_restore_task_status.go | 190 +-- ...ore_task_status_current_indexing_status.go | 99 -- ...ore_task_status_current_snapshot_status.go | 97 -- ...re_task_status_local_protection_job_uid.go | 97 -- ...ault_restore_task_status_parent_job_uid.go | 96 -- ...ault_restore_task_status_search_job_uid.go | 95 -- .../remote_vault_search_job_information.go | 35 +- ...t_search_job_information_search_job_uid.go | 95 -- v1/models/remote_vault_search_job_results.go | 35 +- ...vault_search_job_results_search_job_uid.go | 95 -- v1/models/replication_info_base.go | 51 + v1/models/restore_files_task_request.go | 42 +- ...e_files_task_request_source_object_info.go | 102 -- v1/models/restore_object_customization.go | 113 ++ v1/models/restore_object_details.go | 114 +- .../restore_object_details_archival_target.go | 98 -- ...tore_object_details_cloud_deploy_target.go | 97 -- v1/models/restore_object_details_job_uid.go | 97 -- v1/models/restore_sql_app_object_params.go | 3 + v1/models/restore_task.go | 106 +- v1/models/restore_task_archive_task_uid.go | 97 -- .../restore_task_clone_view_parameters.go | 93 -- v1/models/restore_task_error.go | 96 -- v1/models/s3_protection_params.go | 56 + v1/models/scheduling_policy.go | 142 +- .../scheduling_policy_continuous_schedule.go | 96 -- v1/models/scheduling_policy_daily_schedule.go | 94 -- .../scheduling_policy_monthly_schedule.go | 94 -- v1/models/scheduling_policy_rpo_schedule.go | 94 -- v1/models/snapshot_archival_copy_policy.go | 33 +- .../snapshot_archival_copy_policy_target.go | 93 -- v1/models/snapshot_replication_copy_policy.go | 33 +- ...snapshot_replication_copy_policy_target.go | 93 -- v1/models/source_special_parameter.go | 43 +- ...source_special_parameter_vm_credentials.go | 103 -- ...stop_remote_vault_search_job_parameters.go | 33 +- ...lt_search_job_parameters_search_job_uid.go | 93 -- v1/models/string_entity_ids.go | 307 +++++ v1/models/string_entity_ids_proto.go | 181 ++- ...y_ids_proto_source_generated_string_ids.go | 129 ++ ..._generated_string_ids_entity_identifier.go | 67 + .../string_entity_ids_proto_string_id.go | 13 +- v1/models/time_of_a_week.go | 70 +- v1/models/time_of_a_week_end_time.go | 95 -- v1/models/time_of_a_week_start_time.go | 95 -- v1/models/update_cluster_params.go | 6 + v1/models/update_protection_job_run.go | 33 +- .../update_protection_job_run_job_uid.go | 93 -- .../update_protection_source_parameters.go | 69 +- ...source_parameters_nas_mount_credentials.go | 96 -- ...ion_source_parameters_throttling_policy.go | 93 -- v1/models/update_view_param.go | 111 +- v1/models/update_view_param_logical_quota.go | 107 -- v1/models/upload_package_result.go | 53 - v1/models/v_mware_rx_cluster_capability.go | 51 + v1/models/vault_encryption_key.go | 35 +- v1/models/vault_encryption_key_key_uid.go | 95 -- v1/models/version_info.go | 58 + v1/models/view.go | 111 +- v1/models/view_box.go | 127 +- .../view_box_default_user_quota_policy.go | 94 -- .../view_box_default_view_quota_policy.go | 104 -- v1/models/view_box_physical_quota.go | 107 -- v1/models/view_logical_quota.go | 107 -- v1/models/view_protection_source.go | 34 +- v1/models/view_protection_source_id.go | 94 -- v1/models/view_protocol.go | 63 + v1/models/vlan.go | 79 +- v1/models/vlan_subnet.go | 99 -- v1/models/vlan_subnet_v6.go | 98 -- v1/models/vmware_special_parameters.go | 40 +- ...mware_special_parameters_vm_credentials.go | 100 -- ...lete_cluster_snapshot_policy_parameters.go | 128 ++ ...elete_cluster_snapshot_policy_responses.go | 173 +++ .../get_cluster_snapshot_policy_parameters.go | 128 ++ .../get_cluster_snapshot_policy_responses.go | 187 +++ v2/client/platform/platform_client.go | 126 ++ ...date_cluster_snapshot_policy_parameters.go | 153 +++ ...pdate_cluster_snapshot_policy_responses.go | 187 +++ .../get_protection_group_runs_parameters.go | 70 + .../get_protection_groups_parameters.go | 70 + .../get_remote_clusters_parameters.go | 34 + .../view/get_views_summary_parameters.go | 147 ++ ...archival_s3_comp_external_target_params.go | 11 + v2/models/audit_entity_types.go | 10 +- v2/models/aws_i_am_role_params.go | 16 +- v2/models/aws_source_registration_params.go | 51 + v2/models/cipher_suite.go | 10 +- v2/models/ciphers_resp.go | 4 +- v2/models/cluster_snapshot_policy.go | 162 +++ ...mon_archival_aws_external_target_params.go | 11 + v2/models/database_entity_info.go | 52 + v2/models/entity_identifiers.go | 59 + v2/models/legal_hold.go | 107 ++ v2/models/modify_ciphers_request_body.go | 2 +- ...odify_object_store_ciphers_request_body.go | 2 +- v2/models/object_identifier.go | 58 +- v2/models/object_run_list.go | 91 ++ v2/models/object_store_ciphers_resp.go | 4 +- v2/models/object_string_identifier.go | 112 ++ v2/models/otp_verification_state.go | 113 ++ v2/models/protection_group_runs.go | 3 + v2/models/protection_groups.go | 3 + .../recover_vmware_vm_new_network_config.go | 71 + ...er_vmware_vm_new_network_config_mapping.go | 222 +++ v2/models/recover_vmware_vm_params.go | 62 + v2/models/restore_object_customization.go | 114 ++ v2/models/s3_specific_params.go | 90 ++ v2/models/snapshot_retention_policy.go | 58 + v2/models/snapshot_schedule_policy.go | 113 ++ v2/models/string_entity_ids.go | 296 ++++ v2/models/support_mfa_config_info.go | 86 +- v2/models/target_object_run.go | 74 + v2/models/tenant_migration_action.go | 53 + ...e_objects_runs_metadata_internal_params.go | 117 ++ .../update_objects_runs_metadata_params.go | 466 +++++++ .../update_objects_runs_metadata_response.go | 124 ++ v2/models/update_snapshot_policy_params.go | 73 + v2/models/version_info.go | 55 + 305 files changed, 7944 insertions(+), 19399 deletions(-) delete mode 100644 v1/client/network/create_ip_config_parameters.go delete mode 100644 v1/client/network/create_ip_config_responses.go delete mode 100644 v1/client/network/delete_ip_config_parameters.go delete mode 100644 v1/client/network/delete_ip_config_responses.go delete mode 100644 v1/client/packages/upload_package_parameters.go delete mode 100644 v1/client/packages/upload_package_responses.go delete mode 100644 v1/models/backup_script_full_backup_script.go delete mode 100644 v1/models/backup_script_incremental_backup_script.go delete mode 100644 v1/models/backup_script_log_backup_script.go delete mode 100644 v1/models/backup_script_remote_host.go delete mode 100644 v1/models/bifrost_config_subnet.go delete mode 100644 v1/models/blackout_period_end_time.go delete mode 100644 v1/models/blackout_period_start_time.go delete mode 100644 v1/models/clone_task_request_clone_view_parameters.go delete mode 100644 v1/models/clone_view_request_logical_quota.go delete mode 100644 v1/models/cluster_eula_config.go delete mode 100644 v1/models/cluster_license_state.go delete mode 100644 v1/models/cluster_stats_cloud_usage_perf_stats.go delete mode 100644 v1/models/cluster_stats_local_usage_perf_stats.go delete mode 100644 v1/models/cluster_stats_logical_stats.go delete mode 100644 v1/models/cluster_stats_usage_perf_stats.go delete mode 100644 v1/models/copy_run_task_uid.go delete mode 100644 v1/models/create_ip_config_parameters.go delete mode 100644 v1/models/create_ip_config_result.go delete mode 100644 v1/models/create_remote_vault_restore_task_parameters_search_job_uid.go delete mode 100644 v1/models/create_view_box_params_default_user_quota_policy.go delete mode 100644 v1/models/create_view_box_params_default_view_quota_policy.go delete mode 100644 v1/models/create_view_box_params_physical_quota.go delete mode 100644 v1/models/create_view_request_logical_quota.go delete mode 100644 v1/models/created_remote_vault_search_job_uid_search_job_uid.go delete mode 100644 v1/models/delete_ip_config_parameters.go create mode 100644 v1/models/entity_identifiers.go delete mode 100644 v1/models/file_search_result_job_uid.go delete mode 100644 v1/models/filesystem_volume_logical_volume.go delete mode 100644 v1/models/get_registration_info_response_stats.go delete mode 100644 v1/models/index_and_snapshots_archive_task_uid.go delete mode 100644 v1/models/index_and_snapshots_remote_protection_job_uid.go delete mode 100644 v1/models/mount_volume_result_details_mount_error.go delete mode 100644 v1/models/mount_volumes_state_other_error.go delete mode 100644 v1/models/object_snapshot_info_job_uid.go create mode 100644 v1/models/object_string_identifier.go create mode 100644 v1/models/peristent_volume_status_capacity_entry.go delete mode 100644 v1/models/physical_protection_source_id.go create mode 100644 v1/models/private_s3_protection_params.go delete mode 100644 v1/models/protected_vm_info_stats.go delete mode 100644 v1/models/protection_job_full_protection_start_time.go delete mode 100644 v1/models/protection_job_incremental_protection_start_time.go delete mode 100644 v1/models/protection_job_post_backup_script.go delete mode 100644 v1/models/protection_job_pre_backup_script.go delete mode 100644 v1/models/protection_job_remote_script.go delete mode 100644 v1/models/protection_job_request_body_full_protection_start_time.go delete mode 100644 v1/models/protection_job_request_body_incremental_protection_start_time.go delete mode 100644 v1/models/protection_job_request_body_post_backup_script.go delete mode 100644 v1/models/protection_job_request_body_pre_backup_script.go delete mode 100644 v1/models/protection_job_request_body_remote_script.go delete mode 100644 v1/models/protection_job_request_body_start_time.go delete mode 100644 v1/models/protection_job_start_time.go delete mode 100644 v1/models/protection_job_uid.go delete mode 100644 v1/models/protection_object_summary_protection_source.go delete mode 100644 v1/models/protection_policy_full_scheduling_policy.go delete mode 100644 v1/models/protection_policy_incremental_scheduling_policy.go delete mode 100644 v1/models/protection_policy_request_full_scheduling_policy.go delete mode 100644 v1/models/protection_policy_request_incremental_scheduling_policy.go delete mode 100644 v1/models/protection_run_instance_job_uid.go delete mode 100644 v1/models/protection_source_acropolis_protection_source.go delete mode 100644 v1/models/protection_source_ad_protection_source.go delete mode 100644 v1/models/protection_source_aws_protection_source.go delete mode 100644 v1/models/protection_source_azure_protection_source.go delete mode 100644 v1/models/protection_source_cassandra_protection_source.go delete mode 100644 v1/models/protection_source_couchbase_protection_source.go delete mode 100644 v1/models/protection_source_elastifile_protection_source.go delete mode 100644 v1/models/protection_source_exchange_protection_source.go delete mode 100644 v1/models/protection_source_flash_blade_protection_source.go delete mode 100644 v1/models/protection_source_gcp_protection_source.go delete mode 100644 v1/models/protection_source_gpfs_protection_source.go delete mode 100644 v1/models/protection_source_hbase_protection_source.go delete mode 100644 v1/models/protection_source_hdfs_protection_source.go delete mode 100644 v1/models/protection_source_hive_protection_source.go delete mode 100644 v1/models/protection_source_hyper_flex_protection_source.go delete mode 100644 v1/models/protection_source_hyperv_protection_source.go delete mode 100644 v1/models/protection_source_ibm_flash_system_protection_source.go delete mode 100644 v1/models/protection_source_isilon_protection_source.go delete mode 100644 v1/models/protection_source_kubernetes_protection_source.go delete mode 100644 v1/models/protection_source_kvm_protection_source.go delete mode 100644 v1/models/protection_source_mongodb_protection_source.go delete mode 100644 v1/models/protection_source_nas_protection_source.go delete mode 100644 v1/models/protection_source_netapp_protection_source.go delete mode 100644 v1/models/protection_source_nimble_protection_source.go delete mode 100644 v1/models/protection_source_node_protection_source.go delete mode 100644 v1/models/protection_source_node_registration_info.go delete mode 100644 v1/models/protection_source_office365_protection_source.go delete mode 100644 v1/models/protection_source_oracle_protection_source.go delete mode 100644 v1/models/protection_source_physical_protection_source.go delete mode 100644 v1/models/protection_source_pure_protection_source.go delete mode 100644 v1/models/protection_source_sfdc_protection_source.go delete mode 100644 v1/models/protection_source_sql_protection_source.go delete mode 100644 v1/models/protection_source_tree_info_registration_info.go delete mode 100644 v1/models/protection_source_tree_info_root_node.go delete mode 100644 v1/models/protection_source_tree_info_stats.go delete mode 100644 v1/models/protection_source_uda_protection_source.go delete mode 100644 v1/models/protection_source_view_protection_source.go delete mode 100644 v1/models/protection_source_vm_ware_protection_source.go delete mode 100644 v1/models/protection_sources_job_runs_report_element_protection_source.go delete mode 100644 v1/models/protection_sources_summary_stats_protection_source.go delete mode 100644 v1/models/register_protection_source_parameters_nas_mount_credentials.go delete mode 100644 v1/models/register_protection_source_parameters_throttling_policy.go delete mode 100644 v1/models/registered_application_server_application_server.go delete mode 100644 v1/models/registered_application_server_registered_protection_source.go delete mode 100644 v1/models/registered_source_info_nas_mount_credentials.go delete mode 100644 v1/models/remote_job_script_full_backup_script.go delete mode 100644 v1/models/remote_job_script_incremental_backup_script.go delete mode 100644 v1/models/remote_job_script_log_backup_script.go delete mode 100644 v1/models/remote_job_script_remote_host.go delete mode 100644 v1/models/remote_protection_job_information_job_uid.go delete mode 100644 v1/models/remote_protection_job_run_information_job_uid.go delete mode 100644 v1/models/remote_protection_job_run_instance_archive_task_uid.go delete mode 100644 v1/models/remote_restore_indexing_status_indexing_task_uid.go delete mode 100644 v1/models/remote_restore_snapshot_status_archive_task_uid.go delete mode 100644 v1/models/remote_restore_snapshot_status_snapshot_task_uid.go delete mode 100644 v1/models/remote_vault_restore_task_status_current_indexing_status.go delete mode 100644 v1/models/remote_vault_restore_task_status_current_snapshot_status.go delete mode 100644 v1/models/remote_vault_restore_task_status_local_protection_job_uid.go delete mode 100644 v1/models/remote_vault_restore_task_status_parent_job_uid.go delete mode 100644 v1/models/remote_vault_restore_task_status_search_job_uid.go delete mode 100644 v1/models/remote_vault_search_job_information_search_job_uid.go delete mode 100644 v1/models/remote_vault_search_job_results_search_job_uid.go delete mode 100644 v1/models/restore_files_task_request_source_object_info.go create mode 100644 v1/models/restore_object_customization.go delete mode 100644 v1/models/restore_object_details_archival_target.go delete mode 100644 v1/models/restore_object_details_cloud_deploy_target.go delete mode 100644 v1/models/restore_object_details_job_uid.go delete mode 100644 v1/models/restore_task_archive_task_uid.go delete mode 100644 v1/models/restore_task_clone_view_parameters.go delete mode 100644 v1/models/restore_task_error.go create mode 100644 v1/models/s3_protection_params.go delete mode 100644 v1/models/scheduling_policy_continuous_schedule.go delete mode 100644 v1/models/scheduling_policy_daily_schedule.go delete mode 100644 v1/models/scheduling_policy_monthly_schedule.go delete mode 100644 v1/models/scheduling_policy_rpo_schedule.go delete mode 100644 v1/models/snapshot_archival_copy_policy_target.go delete mode 100644 v1/models/snapshot_replication_copy_policy_target.go delete mode 100644 v1/models/source_special_parameter_vm_credentials.go delete mode 100644 v1/models/stop_remote_vault_search_job_parameters_search_job_uid.go create mode 100644 v1/models/string_entity_ids.go create mode 100644 v1/models/string_entity_ids_proto_source_generated_string_ids.go create mode 100644 v1/models/string_entity_ids_proto_source_generated_string_ids_entity_identifier.go delete mode 100644 v1/models/time_of_a_week_end_time.go delete mode 100644 v1/models/time_of_a_week_start_time.go delete mode 100644 v1/models/update_protection_job_run_job_uid.go delete mode 100644 v1/models/update_protection_source_parameters_nas_mount_credentials.go delete mode 100644 v1/models/update_protection_source_parameters_throttling_policy.go delete mode 100644 v1/models/update_view_param_logical_quota.go delete mode 100644 v1/models/upload_package_result.go create mode 100644 v1/models/v_mware_rx_cluster_capability.go delete mode 100644 v1/models/vault_encryption_key_key_uid.go create mode 100644 v1/models/version_info.go delete mode 100644 v1/models/view_box_default_user_quota_policy.go delete mode 100644 v1/models/view_box_default_view_quota_policy.go delete mode 100644 v1/models/view_box_physical_quota.go delete mode 100644 v1/models/view_logical_quota.go delete mode 100644 v1/models/view_protection_source_id.go create mode 100644 v1/models/view_protocol.go delete mode 100644 v1/models/vlan_subnet.go delete mode 100644 v1/models/vlan_subnet_v6.go delete mode 100644 v1/models/vmware_special_parameters_vm_credentials.go create mode 100644 v2/client/platform/delete_cluster_snapshot_policy_parameters.go create mode 100644 v2/client/platform/delete_cluster_snapshot_policy_responses.go create mode 100644 v2/client/platform/get_cluster_snapshot_policy_parameters.go create mode 100644 v2/client/platform/get_cluster_snapshot_policy_responses.go create mode 100644 v2/client/platform/update_cluster_snapshot_policy_parameters.go create mode 100644 v2/client/platform/update_cluster_snapshot_policy_responses.go create mode 100644 v2/models/cluster_snapshot_policy.go create mode 100644 v2/models/entity_identifiers.go create mode 100644 v2/models/legal_hold.go create mode 100644 v2/models/object_run_list.go create mode 100644 v2/models/object_string_identifier.go create mode 100644 v2/models/otp_verification_state.go create mode 100644 v2/models/recover_vmware_vm_new_network_config_mapping.go create mode 100644 v2/models/restore_object_customization.go create mode 100644 v2/models/s3_specific_params.go create mode 100644 v2/models/snapshot_retention_policy.go create mode 100644 v2/models/snapshot_schedule_policy.go create mode 100644 v2/models/string_entity_ids.go create mode 100644 v2/models/target_object_run.go create mode 100644 v2/models/update_objects_runs_metadata_internal_params.go create mode 100644 v2/models/update_objects_runs_metadata_params.go create mode 100644 v2/models/update_objects_runs_metadata_response.go create mode 100644 v2/models/update_snapshot_policy_params.go create mode 100644 v2/models/version_info.go diff --git a/README.md b/README.md index 3a678f48..639f2249 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ go get github.com/cohesity/go-sdk |Cluster Version| SDK Version| |---|--| -|7.1.2|7.1.2| +|7.1.2_u2|7.1.2201| ## How to Use: :mag_right: This SDK exposes all the functionality provided by *Cohesity REST API*. @@ -55,7 +55,7 @@ import( apiClient "github.com/cohesity/go-sdk/v2/client" "github.com/cohesity/go-sdk/v2/client/access_token" "github.com/cohesity/go-sdk/v2/models" - "github.com/cohesity/go-sdk/v2/client/source" + "github.com/cohesity/go-sdk/v2/client/protection_group" "github.com/go-openapi/strfmt" ) @@ -70,7 +70,7 @@ body := &models.CreateAccessTokenRequestParams{ } resp, err := client.AccessToken.CreateAccessToken(access_token.NewCreateAccessTokenParams().WithBody(body), nil) bearerTokenAuth := httptransport.BearerToken(*resp.Payload.AccessToken) # the bearertoken is the authentication we use to access the APIs -sourceResp, err := client2.Source.GetProtectionSources(source.NewGetProtectionSourcesParams(), bearerTokenAuth) #example api +protectionGroupResp, err := client.ProtectionGroup.GetProtectionGroups(protection_group.NewGetProtectionGroupsParams(), bearerTokenAuth) #example api ``` ## Questions or Feedback :raised_hand: diff --git a/v1/client/backup_jobs/get_backup_job_runs_parameters.go b/v1/client/backup_jobs/get_backup_job_runs_parameters.go index 1ec32063..4a31e0ca 100644 --- a/v1/client/backup_jobs/get_backup_job_runs_parameters.go +++ b/v1/client/backup_jobs/get_backup_job_runs_parameters.go @@ -169,6 +169,21 @@ type GetBackupJobRunsParams struct { */ IncludeRpoSnapshots *bool + /* IncludeSourceDeletedJobs. + + If set, Magneto will also return the deleted jobs for the given EntityId. + */ + IncludeSourceDeletedJobs *bool + + /* MaxResultCount. + + Identifies the max number of items to be returned. This is specifically + to be used with pagination. + + Format: int64 + */ + MaxResultCount *int64 + /* NumRuns. NumRuns is the number of runs. If specified, at most these many runs will @@ -178,6 +193,13 @@ type GetBackupJobRunsParams struct { */ NumRuns *int64 + /* OnlyIncludeSourceTask. + + If set, Magneto will return only given source tasks in the job runs for + the given source(EntityId). + */ + OnlyIncludeSourceTask *bool + /* OnlyIncludeSuccessfulCopyRuns. If marked false, all CopyTasks in any finished state like cancelled, @@ -210,6 +232,12 @@ type GetBackupJobRunsParams struct { */ OutputFormat *string + /* PaginationCookie. + + Pagination cookie to fetch the next set of results. + */ + PaginationCookie *string + /* RunTypes. Filter by run type i.e. kFull, kRegular, kLog. @@ -440,6 +468,28 @@ func (o *GetBackupJobRunsParams) SetIncludeRpoSnapshots(includeRpoSnapshots *boo o.IncludeRpoSnapshots = includeRpoSnapshots } +// WithIncludeSourceDeletedJobs adds the includeSourceDeletedJobs to the get backup job runs params +func (o *GetBackupJobRunsParams) WithIncludeSourceDeletedJobs(includeSourceDeletedJobs *bool) *GetBackupJobRunsParams { + o.SetIncludeSourceDeletedJobs(includeSourceDeletedJobs) + return o +} + +// SetIncludeSourceDeletedJobs adds the includeSourceDeletedJobs to the get backup job runs params +func (o *GetBackupJobRunsParams) SetIncludeSourceDeletedJobs(includeSourceDeletedJobs *bool) { + o.IncludeSourceDeletedJobs = includeSourceDeletedJobs +} + +// WithMaxResultCount adds the maxResultCount to the get backup job runs params +func (o *GetBackupJobRunsParams) WithMaxResultCount(maxResultCount *int64) *GetBackupJobRunsParams { + o.SetMaxResultCount(maxResultCount) + return o +} + +// SetMaxResultCount adds the maxResultCount to the get backup job runs params +func (o *GetBackupJobRunsParams) SetMaxResultCount(maxResultCount *int64) { + o.MaxResultCount = maxResultCount +} + // WithNumRuns adds the numRuns to the get backup job runs params func (o *GetBackupJobRunsParams) WithNumRuns(numRuns *int64) *GetBackupJobRunsParams { o.SetNumRuns(numRuns) @@ -451,6 +501,17 @@ func (o *GetBackupJobRunsParams) SetNumRuns(numRuns *int64) { o.NumRuns = numRuns } +// WithOnlyIncludeSourceTask adds the onlyIncludeSourceTask to the get backup job runs params +func (o *GetBackupJobRunsParams) WithOnlyIncludeSourceTask(onlyIncludeSourceTask *bool) *GetBackupJobRunsParams { + o.SetOnlyIncludeSourceTask(onlyIncludeSourceTask) + return o +} + +// SetOnlyIncludeSourceTask adds the onlyIncludeSourceTask to the get backup job runs params +func (o *GetBackupJobRunsParams) SetOnlyIncludeSourceTask(onlyIncludeSourceTask *bool) { + o.OnlyIncludeSourceTask = onlyIncludeSourceTask +} + // WithOnlyIncludeSuccessfulCopyRuns adds the onlyIncludeSuccessfulCopyRuns to the get backup job runs params func (o *GetBackupJobRunsParams) WithOnlyIncludeSuccessfulCopyRuns(onlyIncludeSuccessfulCopyRuns *bool) *GetBackupJobRunsParams { o.SetOnlyIncludeSuccessfulCopyRuns(onlyIncludeSuccessfulCopyRuns) @@ -495,6 +556,17 @@ func (o *GetBackupJobRunsParams) SetOutputFormat(outputFormat *string) { o.OutputFormat = outputFormat } +// WithPaginationCookie adds the paginationCookie to the get backup job runs params +func (o *GetBackupJobRunsParams) WithPaginationCookie(paginationCookie *string) *GetBackupJobRunsParams { + o.SetPaginationCookie(paginationCookie) + return o +} + +// SetPaginationCookie adds the paginationCookie to the get backup job runs params +func (o *GetBackupJobRunsParams) SetPaginationCookie(paginationCookie *string) { + o.PaginationCookie = paginationCookie +} + // WithRunTypes adds the runTypes to the get backup job runs params func (o *GetBackupJobRunsParams) WithRunTypes(runTypes []string) *GetBackupJobRunsParams { o.SetRunTypes(runTypes) @@ -762,6 +834,40 @@ func (o *GetBackupJobRunsParams) WriteToRequest(r runtime.ClientRequest, reg str } } + if o.IncludeSourceDeletedJobs != nil { + + // query param includeSourceDeletedJobs + var qrIncludeSourceDeletedJobs bool + + if o.IncludeSourceDeletedJobs != nil { + qrIncludeSourceDeletedJobs = *o.IncludeSourceDeletedJobs + } + qIncludeSourceDeletedJobs := swag.FormatBool(qrIncludeSourceDeletedJobs) + if qIncludeSourceDeletedJobs != "" { + + if err := r.SetQueryParam("includeSourceDeletedJobs", qIncludeSourceDeletedJobs); err != nil { + return err + } + } + } + + if o.MaxResultCount != nil { + + // query param maxResultCount + var qrMaxResultCount int64 + + if o.MaxResultCount != nil { + qrMaxResultCount = *o.MaxResultCount + } + qMaxResultCount := swag.FormatInt64(qrMaxResultCount) + if qMaxResultCount != "" { + + if err := r.SetQueryParam("maxResultCount", qMaxResultCount); err != nil { + return err + } + } + } + if o.NumRuns != nil { // query param numRuns @@ -779,6 +885,23 @@ func (o *GetBackupJobRunsParams) WriteToRequest(r runtime.ClientRequest, reg str } } + if o.OnlyIncludeSourceTask != nil { + + // query param onlyIncludeSourceTask + var qrOnlyIncludeSourceTask bool + + if o.OnlyIncludeSourceTask != nil { + qrOnlyIncludeSourceTask = *o.OnlyIncludeSourceTask + } + qOnlyIncludeSourceTask := swag.FormatBool(qrOnlyIncludeSourceTask) + if qOnlyIncludeSourceTask != "" { + + if err := r.SetQueryParam("onlyIncludeSourceTask", qOnlyIncludeSourceTask); err != nil { + return err + } + } + } + if o.OnlyIncludeSuccessfulCopyRuns != nil { // query param onlyIncludeSuccessfulCopyRuns @@ -847,6 +970,23 @@ func (o *GetBackupJobRunsParams) WriteToRequest(r runtime.ClientRequest, reg str } } + if o.PaginationCookie != nil { + + // query param paginationCookie + var qrPaginationCookie string + + if o.PaginationCookie != nil { + qrPaginationCookie = *o.PaginationCookie + } + qPaginationCookie := qrPaginationCookie + if qPaginationCookie != "" { + + if err := r.SetQueryParam("paginationCookie", qPaginationCookie); err != nil { + return err + } + } + } + if o.RunTypes != nil { // binding items for runTypes diff --git a/v1/client/backup_jobs/get_backup_jobs_summary_parameters.go b/v1/client/backup_jobs/get_backup_jobs_summary_parameters.go index 9f45bbc0..f877ab46 100644 --- a/v1/client/backup_jobs/get_backup_jobs_summary_parameters.go +++ b/v1/client/backup_jobs/get_backup_jobs_summary_parameters.go @@ -140,6 +140,15 @@ type GetBackupJobsSummaryParams struct { */ IsLastRunSLAViolated *bool + /* MaxResultCount. + + Specifies the max number of items to be returned. This is to be used + with the pagination params only. + + Format: int64 + */ + MaxResultCount *int64 + /* MaxRuns. MaxRuns specifies the maximum number of job runs. If specified, only the @@ -187,6 +196,12 @@ type GetBackupJobsSummaryParams struct { */ OutputFormat *string + /* PaginationCookie. + + Pagination cookie to fetch the next set of results. + */ + PaginationCookie *string + /* PolicyIds. PolicyIds are the Ids of policies to filter by. @@ -409,6 +424,17 @@ func (o *GetBackupJobsSummaryParams) SetIsLastRunSLAViolated(isLastRunSLAViolate o.IsLastRunSLAViolated = isLastRunSLAViolated } +// WithMaxResultCount adds the maxResultCount to the get backup jobs summary params +func (o *GetBackupJobsSummaryParams) WithMaxResultCount(maxResultCount *int64) *GetBackupJobsSummaryParams { + o.SetMaxResultCount(maxResultCount) + return o +} + +// SetMaxResultCount adds the maxResultCount to the get backup jobs summary params +func (o *GetBackupJobsSummaryParams) SetMaxResultCount(maxResultCount *int64) { + o.MaxResultCount = maxResultCount +} + // WithMaxRuns adds the maxRuns to the get backup jobs summary params func (o *GetBackupJobsSummaryParams) WithMaxRuns(maxRuns *int64) *GetBackupJobsSummaryParams { o.SetMaxRuns(maxRuns) @@ -475,6 +501,17 @@ func (o *GetBackupJobsSummaryParams) SetOutputFormat(outputFormat *string) { o.OutputFormat = outputFormat } +// WithPaginationCookie adds the paginationCookie to the get backup jobs summary params +func (o *GetBackupJobsSummaryParams) WithPaginationCookie(paginationCookie *string) *GetBackupJobsSummaryParams { + o.SetPaginationCookie(paginationCookie) + return o +} + +// SetPaginationCookie adds the paginationCookie to the get backup jobs summary params +func (o *GetBackupJobsSummaryParams) SetPaginationCookie(paginationCookie *string) { + o.PaginationCookie = paginationCookie +} + // WithPolicyIds adds the policyIds to the get backup jobs summary params func (o *GetBackupJobsSummaryParams) WithPolicyIds(policyIds []string) *GetBackupJobsSummaryParams { o.SetPolicyIds(policyIds) @@ -735,6 +772,23 @@ func (o *GetBackupJobsSummaryParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.MaxResultCount != nil { + + // query param maxResultCount + var qrMaxResultCount int64 + + if o.MaxResultCount != nil { + qrMaxResultCount = *o.MaxResultCount + } + qMaxResultCount := swag.FormatInt64(qrMaxResultCount) + if qMaxResultCount != "" { + + if err := r.SetQueryParam("maxResultCount", qMaxResultCount); err != nil { + return err + } + } + } + if o.MaxRuns != nil { // query param maxRuns @@ -831,6 +885,23 @@ func (o *GetBackupJobsSummaryParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.PaginationCookie != nil { + + // query param paginationCookie + var qrPaginationCookie string + + if o.PaginationCookie != nil { + qrPaginationCookie = *o.PaginationCookie + } + qPaginationCookie := qrPaginationCookie + if qPaginationCookie != "" { + + if err := r.SetQueryParam("paginationCookie", qPaginationCookie); err != nil { + return err + } + } + } + if o.PolicyIds != nil { // binding items for policyIds diff --git a/v1/client/network/create_ip_config_parameters.go b/v1/client/network/create_ip_config_parameters.go deleted file mode 100644 index 8209980e..00000000 --- a/v1/client/network/create_ip_config_parameters.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package network - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/cohesity/go-sdk/v1/models" -) - -// NewCreateIPConfigParams creates a new CreateIPConfigParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewCreateIPConfigParams() *CreateIPConfigParams { - return &CreateIPConfigParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateIPConfigParamsWithTimeout creates a new CreateIPConfigParams object -// with the ability to set a timeout on a request. -func NewCreateIPConfigParamsWithTimeout(timeout time.Duration) *CreateIPConfigParams { - return &CreateIPConfigParams{ - timeout: timeout, - } -} - -// NewCreateIPConfigParamsWithContext creates a new CreateIPConfigParams object -// with the ability to set a context for a request. -func NewCreateIPConfigParamsWithContext(ctx context.Context) *CreateIPConfigParams { - return &CreateIPConfigParams{ - Context: ctx, - } -} - -// NewCreateIPConfigParamsWithHTTPClient creates a new CreateIPConfigParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateIPConfigParamsWithHTTPClient(client *http.Client) *CreateIPConfigParams { - return &CreateIPConfigParams{ - HTTPClient: client, - } -} - -/* -CreateIPConfigParams contains all the parameters to send to the API endpoint - - for the create Ip config operation. - - Typically these are written to a http.Request. -*/ -type CreateIPConfigParams struct { - - // Body. - Body *models.CreateIPConfigParameters - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create Ip config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateIPConfigParams) WithDefaults() *CreateIPConfigParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create Ip config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateIPConfigParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create Ip config params -func (o *CreateIPConfigParams) WithTimeout(timeout time.Duration) *CreateIPConfigParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create Ip config params -func (o *CreateIPConfigParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create Ip config params -func (o *CreateIPConfigParams) WithContext(ctx context.Context) *CreateIPConfigParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create Ip config params -func (o *CreateIPConfigParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create Ip config params -func (o *CreateIPConfigParams) WithHTTPClient(client *http.Client) *CreateIPConfigParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create Ip config params -func (o *CreateIPConfigParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create Ip config params -func (o *CreateIPConfigParams) WithBody(body *models.CreateIPConfigParameters) *CreateIPConfigParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create Ip config params -func (o *CreateIPConfigParams) SetBody(body *models.CreateIPConfigParameters) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateIPConfigParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.Body != nil { - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/network/create_ip_config_responses.go b/v1/client/network/create_ip_config_responses.go deleted file mode 100644 index cf534c5c..00000000 --- a/v1/client/network/create_ip_config_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package network - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/cohesity/go-sdk/v1/models" -) - -// CreateIPConfigReader is a Reader for the CreateIPConfig structure. -type CreateIPConfigReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateIPConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewCreateIPConfigOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewCreateIPConfigDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewCreateIPConfigOK creates a CreateIPConfigOK with default headers values -func NewCreateIPConfigOK() *CreateIPConfigOK { - return &CreateIPConfigOK{} -} - -/* -CreateIPConfigOK describes a response with status code 200, with default header values. - -Success -*/ -type CreateIPConfigOK struct { - Payload *models.CreateIPConfigResult -} - -// IsSuccess returns true when this create Ip config o k response has a 2xx status code -func (o *CreateIPConfigOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create Ip config o k response has a 3xx status code -func (o *CreateIPConfigOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create Ip config o k response has a 4xx status code -func (o *CreateIPConfigOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this create Ip config o k response has a 5xx status code -func (o *CreateIPConfigOK) IsServerError() bool { - return false -} - -// IsCode returns true when this create Ip config o k response a status code equal to that given -func (o *CreateIPConfigOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the create Ip config o k response -func (o *CreateIPConfigOK) Code() int { - return 200 -} - -func (o *CreateIPConfigOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/network/ipConfig][%d] createIpConfigOK %s", 200, payload) -} - -func (o *CreateIPConfigOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/network/ipConfig][%d] createIpConfigOK %s", 200, payload) -} - -func (o *CreateIPConfigOK) GetPayload() *models.CreateIPConfigResult { - return o.Payload -} - -func (o *CreateIPConfigOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.CreateIPConfigResult) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateIPConfigDefault creates a CreateIPConfigDefault with default headers values -func NewCreateIPConfigDefault(code int) *CreateIPConfigDefault { - return &CreateIPConfigDefault{ - _statusCode: code, - } -} - -/* -CreateIPConfigDefault describes a response with status code -1, with default header values. - -Error -*/ -type CreateIPConfigDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this create Ip config default response has a 2xx status code -func (o *CreateIPConfigDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create Ip config default response has a 3xx status code -func (o *CreateIPConfigDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create Ip config default response has a 4xx status code -func (o *CreateIPConfigDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create Ip config default response has a 5xx status code -func (o *CreateIPConfigDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create Ip config default response a status code equal to that given -func (o *CreateIPConfigDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create Ip config default response -func (o *CreateIPConfigDefault) Code() int { - return o._statusCode -} - -func (o *CreateIPConfigDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/network/ipConfig][%d] CreateIpConfig default %s", o._statusCode, payload) -} - -func (o *CreateIPConfigDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/network/ipConfig][%d] CreateIpConfig default %s", o._statusCode, payload) -} - -func (o *CreateIPConfigDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *CreateIPConfigDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.RequestError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/network/delete_ip_config_parameters.go b/v1/client/network/delete_ip_config_parameters.go deleted file mode 100644 index d58ffaab..00000000 --- a/v1/client/network/delete_ip_config_parameters.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package network - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/cohesity/go-sdk/v1/models" -) - -// NewDeleteIPConfigParams creates a new DeleteIPConfigParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewDeleteIPConfigParams() *DeleteIPConfigParams { - return &DeleteIPConfigParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteIPConfigParamsWithTimeout creates a new DeleteIPConfigParams object -// with the ability to set a timeout on a request. -func NewDeleteIPConfigParamsWithTimeout(timeout time.Duration) *DeleteIPConfigParams { - return &DeleteIPConfigParams{ - timeout: timeout, - } -} - -// NewDeleteIPConfigParamsWithContext creates a new DeleteIPConfigParams object -// with the ability to set a context for a request. -func NewDeleteIPConfigParamsWithContext(ctx context.Context) *DeleteIPConfigParams { - return &DeleteIPConfigParams{ - Context: ctx, - } -} - -// NewDeleteIPConfigParamsWithHTTPClient creates a new DeleteIPConfigParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteIPConfigParamsWithHTTPClient(client *http.Client) *DeleteIPConfigParams { - return &DeleteIPConfigParams{ - HTTPClient: client, - } -} - -/* -DeleteIPConfigParams contains all the parameters to send to the API endpoint - - for the delete Ip config operation. - - Typically these are written to a http.Request. -*/ -type DeleteIPConfigParams struct { - - // Body. - Body *models.DeleteIPConfigParameters - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete Ip config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteIPConfigParams) WithDefaults() *DeleteIPConfigParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete Ip config params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteIPConfigParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete Ip config params -func (o *DeleteIPConfigParams) WithTimeout(timeout time.Duration) *DeleteIPConfigParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete Ip config params -func (o *DeleteIPConfigParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete Ip config params -func (o *DeleteIPConfigParams) WithContext(ctx context.Context) *DeleteIPConfigParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete Ip config params -func (o *DeleteIPConfigParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete Ip config params -func (o *DeleteIPConfigParams) WithHTTPClient(client *http.Client) *DeleteIPConfigParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete Ip config params -func (o *DeleteIPConfigParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the delete Ip config params -func (o *DeleteIPConfigParams) WithBody(body *models.DeleteIPConfigParameters) *DeleteIPConfigParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the delete Ip config params -func (o *DeleteIPConfigParams) SetBody(body *models.DeleteIPConfigParameters) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteIPConfigParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.Body != nil { - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/network/delete_ip_config_responses.go b/v1/client/network/delete_ip_config_responses.go deleted file mode 100644 index f272c6f2..00000000 --- a/v1/client/network/delete_ip_config_responses.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package network - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/cohesity/go-sdk/v1/models" -) - -// DeleteIPConfigReader is a Reader for the DeleteIPConfig structure. -type DeleteIPConfigReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteIPConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 204: - result := NewDeleteIPConfigNoContent() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteIPConfigDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewDeleteIPConfigNoContent creates a DeleteIPConfigNoContent with default headers values -func NewDeleteIPConfigNoContent() *DeleteIPConfigNoContent { - return &DeleteIPConfigNoContent{} -} - -/* -DeleteIPConfigNoContent describes a response with status code 204, with default header values. - -No Content -*/ -type DeleteIPConfigNoContent struct { -} - -// IsSuccess returns true when this delete Ip config no content response has a 2xx status code -func (o *DeleteIPConfigNoContent) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete Ip config no content response has a 3xx status code -func (o *DeleteIPConfigNoContent) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete Ip config no content response has a 4xx status code -func (o *DeleteIPConfigNoContent) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete Ip config no content response has a 5xx status code -func (o *DeleteIPConfigNoContent) IsServerError() bool { - return false -} - -// IsCode returns true when this delete Ip config no content response a status code equal to that given -func (o *DeleteIPConfigNoContent) IsCode(code int) bool { - return code == 204 -} - -// Code gets the status code for the delete Ip config no content response -func (o *DeleteIPConfigNoContent) Code() int { - return 204 -} - -func (o *DeleteIPConfigNoContent) Error() string { - return fmt.Sprintf("[DELETE /public/network/ipConfig][%d] deleteIpConfigNoContent", 204) -} - -func (o *DeleteIPConfigNoContent) String() string { - return fmt.Sprintf("[DELETE /public/network/ipConfig][%d] deleteIpConfigNoContent", 204) -} - -func (o *DeleteIPConfigNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteIPConfigDefault creates a DeleteIPConfigDefault with default headers values -func NewDeleteIPConfigDefault(code int) *DeleteIPConfigDefault { - return &DeleteIPConfigDefault{ - _statusCode: code, - } -} - -/* -DeleteIPConfigDefault describes a response with status code -1, with default header values. - -Error -*/ -type DeleteIPConfigDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this delete Ip config default response has a 2xx status code -func (o *DeleteIPConfigDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete Ip config default response has a 3xx status code -func (o *DeleteIPConfigDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete Ip config default response has a 4xx status code -func (o *DeleteIPConfigDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete Ip config default response has a 5xx status code -func (o *DeleteIPConfigDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete Ip config default response a status code equal to that given -func (o *DeleteIPConfigDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete Ip config default response -func (o *DeleteIPConfigDefault) Code() int { - return o._statusCode -} - -func (o *DeleteIPConfigDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/network/ipConfig][%d] DeleteIpConfig default %s", o._statusCode, payload) -} - -func (o *DeleteIPConfigDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[DELETE /public/network/ipConfig][%d] DeleteIpConfig default %s", o._statusCode, payload) -} - -func (o *DeleteIPConfigDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *DeleteIPConfigDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.RequestError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/network/network_client.go b/v1/client/network/network_client.go index 4298b055..1ba724d3 100644 --- a/v1/client/network/network_client.go +++ b/v1/client/network/network_client.go @@ -58,14 +58,10 @@ type ClientService interface { CreateBond(params *CreateBondParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateBondOK, error) - CreateIPConfig(params *CreateIPConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateIPConfigOK, error) - DeleteBond(params *DeleteBondParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteBondNoContent, error) DeleteHosts(params *DeleteHostsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteHostsOK, error) - DeleteIPConfig(params *DeleteIPConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteIPConfigNoContent, error) - EditHosts(params *EditHostsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*EditHostsOK, error) ListHosts(params *ListHostsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListHostsOK, error) @@ -157,46 +153,6 @@ func (a *Client) CreateBond(params *CreateBondParams, authInfo runtime.ClientAut return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } -/* -CreateIPConfig creates a new ipconfig entry on the cluster - -Sends a request to create a new ipconfig entry on the Cluster. -*/ -func (a *Client) CreateIPConfig(params *CreateIPConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateIPConfigOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateIPConfigParams() - } - op := &runtime.ClientOperation{ - ID: "CreateIpConfig", - Method: "POST", - PathPattern: "/public/network/ipConfig", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &CreateIPConfigReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*CreateIPConfigOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateIPConfigDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - /* DeleteBond deletes a network bond @@ -281,46 +237,6 @@ func (a *Client) DeleteHosts(params *DeleteHostsParams, authInfo runtime.ClientA return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } -/* -DeleteIPConfig deletes a new ipconfig entry from the cluster - -Sends a request to delete a new ipconfig entry from the Cluster. -*/ -func (a *Client) DeleteIPConfig(params *DeleteIPConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteIPConfigNoContent, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteIPConfigParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteIpConfig", - Method: "DELETE", - PathPattern: "/public/network/ipConfig", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &DeleteIPConfigReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*DeleteIPConfigNoContent) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteIPConfigDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - /* EditHosts edits entries in the cluster s etc hosts file diff --git a/v1/client/packages/packages_client.go b/v1/client/packages/packages_client.go index 878fa09f..6cbcfc55 100644 --- a/v1/client/packages/packages_client.go +++ b/v1/client/packages/packages_client.go @@ -58,8 +58,6 @@ type ClientService interface { ListPackages(params *ListPackagesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListPackagesOK, error) - UploadPackage(params *UploadPackageParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UploadPackageOK, error) - SetTransport(transport runtime.ClientTransport) } @@ -145,49 +143,6 @@ func (a *Client) ListPackages(params *ListPackagesParams, authInfo runtime.Clien return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } -/* - UploadPackage uploads a package which is located locally on your machine to a cluster - - Sends a request to upload a package to a Cluster. This can be used to upload - -a package which is on your local machine. The user must send the package as -a multipart/form-data request. -*/ -func (a *Client) UploadPackage(params *UploadPackageParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UploadPackageOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUploadPackageParams() - } - op := &runtime.ClientOperation{ - ID: "UploadPackage", - Method: "POST", - PathPattern: "/public/packages/file", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"https"}, - Params: params, - Reader: &UploadPackageReader{formats: a.formats}, - AuthInfo: authInfo, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*UploadPackageOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UploadPackageDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - // SetTransport changes the transport on the client func (a *Client) SetTransport(transport runtime.ClientTransport) { a.transport = transport diff --git a/v1/client/packages/upload_package_parameters.go b/v1/client/packages/upload_package_parameters.go deleted file mode 100644 index 27c969fc..00000000 --- a/v1/client/packages/upload_package_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package packages - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewUploadPackageParams creates a new UploadPackageParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewUploadPackageParams() *UploadPackageParams { - return &UploadPackageParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUploadPackageParamsWithTimeout creates a new UploadPackageParams object -// with the ability to set a timeout on a request. -func NewUploadPackageParamsWithTimeout(timeout time.Duration) *UploadPackageParams { - return &UploadPackageParams{ - timeout: timeout, - } -} - -// NewUploadPackageParamsWithContext creates a new UploadPackageParams object -// with the ability to set a context for a request. -func NewUploadPackageParamsWithContext(ctx context.Context) *UploadPackageParams { - return &UploadPackageParams{ - Context: ctx, - } -} - -// NewUploadPackageParamsWithHTTPClient creates a new UploadPackageParams object -// with the ability to set a custom HTTPClient for a request. -func NewUploadPackageParamsWithHTTPClient(client *http.Client) *UploadPackageParams { - return &UploadPackageParams{ - HTTPClient: client, - } -} - -/* -UploadPackageParams contains all the parameters to send to the API endpoint - - for the upload package operation. - - Typically these are written to a http.Request. -*/ -type UploadPackageParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the upload package params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UploadPackageParams) WithDefaults() *UploadPackageParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the upload package params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UploadPackageParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the upload package params -func (o *UploadPackageParams) WithTimeout(timeout time.Duration) *UploadPackageParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the upload package params -func (o *UploadPackageParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the upload package params -func (o *UploadPackageParams) WithContext(ctx context.Context) *UploadPackageParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the upload package params -func (o *UploadPackageParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the upload package params -func (o *UploadPackageParams) WithHTTPClient(client *http.Client) *UploadPackageParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the upload package params -func (o *UploadPackageParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *UploadPackageParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/v1/client/packages/upload_package_responses.go b/v1/client/packages/upload_package_responses.go deleted file mode 100644 index 4b2c8d2e..00000000 --- a/v1/client/packages/upload_package_responses.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package packages - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/cohesity/go-sdk/v1/models" -) - -// UploadPackageReader is a Reader for the UploadPackage structure. -type UploadPackageReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UploadPackageReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUploadPackageOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewUploadPackageDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewUploadPackageOK creates a UploadPackageOK with default headers values -func NewUploadPackageOK() *UploadPackageOK { - return &UploadPackageOK{} -} - -/* -UploadPackageOK describes a response with status code 200, with default header values. - -Success -*/ -type UploadPackageOK struct { - Payload *models.UploadPackageResult -} - -// IsSuccess returns true when this upload package o k response has a 2xx status code -func (o *UploadPackageOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this upload package o k response has a 3xx status code -func (o *UploadPackageOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this upload package o k response has a 4xx status code -func (o *UploadPackageOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this upload package o k response has a 5xx status code -func (o *UploadPackageOK) IsServerError() bool { - return false -} - -// IsCode returns true when this upload package o k response a status code equal to that given -func (o *UploadPackageOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the upload package o k response -func (o *UploadPackageOK) Code() int { - return 200 -} - -func (o *UploadPackageOK) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/packages/file][%d] uploadPackageOK %s", 200, payload) -} - -func (o *UploadPackageOK) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/packages/file][%d] uploadPackageOK %s", 200, payload) -} - -func (o *UploadPackageOK) GetPayload() *models.UploadPackageResult { - return o.Payload -} - -func (o *UploadPackageOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.UploadPackageResult) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUploadPackageDefault creates a UploadPackageDefault with default headers values -func NewUploadPackageDefault(code int) *UploadPackageDefault { - return &UploadPackageDefault{ - _statusCode: code, - } -} - -/* -UploadPackageDefault describes a response with status code -1, with default header values. - -Error -*/ -type UploadPackageDefault struct { - _statusCode int - - Payload *models.RequestError -} - -// IsSuccess returns true when this upload package default response has a 2xx status code -func (o *UploadPackageDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this upload package default response has a 3xx status code -func (o *UploadPackageDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this upload package default response has a 4xx status code -func (o *UploadPackageDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this upload package default response has a 5xx status code -func (o *UploadPackageDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this upload package default response a status code equal to that given -func (o *UploadPackageDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the upload package default response -func (o *UploadPackageDefault) Code() int { - return o._statusCode -} - -func (o *UploadPackageDefault) Error() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/packages/file][%d] UploadPackage default %s", o._statusCode, payload) -} - -func (o *UploadPackageDefault) String() string { - payload, _ := json.Marshal(o.Payload) - return fmt.Sprintf("[POST /public/packages/file][%d] UploadPackage default %s", o._statusCode, payload) -} - -func (o *UploadPackageDefault) GetPayload() *models.RequestError { - return o.Payload -} - -func (o *UploadPackageDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.RequestError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/v1/client/protection_jobs/get_protection_jobs_parameters.go b/v1/client/protection_jobs/get_protection_jobs_parameters.go index b13335ff..559303b2 100644 --- a/v1/client/protection_jobs/get_protection_jobs_parameters.go +++ b/v1/client/protection_jobs/get_protection_jobs_parameters.go @@ -135,6 +135,15 @@ type GetProtectionJobsParams struct { */ IsLastRunSLAViolated *bool + /* MaxResultCount. + + Identifies the max number of items to be returned. This is specifically + to be used with pagination. + + Format: int64 + */ + MaxResultCount *int64 + /* Names. Filter by a list of Protection Job names. @@ -155,6 +164,12 @@ type GetProtectionJobsParams struct { */ OnlyReturnDataMigrationJobs *bool + /* PaginationCookie. + + Pagination cookie to fetch the next set of results. + */ + PaginationCookie *string + /* PolicyIds. Filter by Policy ids that are associated with Protection Jobs. @@ -329,6 +344,17 @@ func (o *GetProtectionJobsParams) SetIsLastRunSLAViolated(isLastRunSLAViolated * o.IsLastRunSLAViolated = isLastRunSLAViolated } +// WithMaxResultCount adds the maxResultCount to the get protection jobs params +func (o *GetProtectionJobsParams) WithMaxResultCount(maxResultCount *int64) *GetProtectionJobsParams { + o.SetMaxResultCount(maxResultCount) + return o +} + +// SetMaxResultCount adds the maxResultCount to the get protection jobs params +func (o *GetProtectionJobsParams) SetMaxResultCount(maxResultCount *int64) { + o.MaxResultCount = maxResultCount +} + // WithNames adds the names to the get protection jobs params func (o *GetProtectionJobsParams) WithNames(names []string) *GetProtectionJobsParams { o.SetNames(names) @@ -362,6 +388,17 @@ func (o *GetProtectionJobsParams) SetOnlyReturnDataMigrationJobs(onlyReturnDataM o.OnlyReturnDataMigrationJobs = onlyReturnDataMigrationJobs } +// WithPaginationCookie adds the paginationCookie to the get protection jobs params +func (o *GetProtectionJobsParams) WithPaginationCookie(paginationCookie *string) *GetProtectionJobsParams { + o.SetPaginationCookie(paginationCookie) + return o +} + +// SetPaginationCookie adds the paginationCookie to the get protection jobs params +func (o *GetProtectionJobsParams) SetPaginationCookie(paginationCookie *string) { + o.PaginationCookie = paginationCookie +} + // WithPolicyIds adds the policyIds to the get protection jobs params func (o *GetProtectionJobsParams) WithPolicyIds(policyIds []string) *GetProtectionJobsParams { o.SetPolicyIds(policyIds) @@ -544,6 +581,23 @@ func (o *GetProtectionJobsParams) WriteToRequest(r runtime.ClientRequest, reg st } } + if o.MaxResultCount != nil { + + // query param maxResultCount + var qrMaxResultCount int64 + + if o.MaxResultCount != nil { + qrMaxResultCount = *o.MaxResultCount + } + qMaxResultCount := swag.FormatInt64(qrMaxResultCount) + if qMaxResultCount != "" { + + if err := r.SetQueryParam("maxResultCount", qMaxResultCount); err != nil { + return err + } + } + } + if o.Names != nil { // binding items for names @@ -589,6 +643,23 @@ func (o *GetProtectionJobsParams) WriteToRequest(r runtime.ClientRequest, reg st } } + if o.PaginationCookie != nil { + + // query param paginationCookie + var qrPaginationCookie string + + if o.PaginationCookie != nil { + qrPaginationCookie = *o.PaginationCookie + } + qPaginationCookie := qrPaginationCookie + if qPaginationCookie != "" { + + if err := r.SetQueryParam("paginationCookie", qPaginationCookie); err != nil { + return err + } + } + } + if o.PolicyIds != nil { // binding items for policyIds diff --git a/v1/client/protection_runs/get_protection_runs_parameters.go b/v1/client/protection_runs/get_protection_runs_parameters.go index 7ff25cdd..c5bcef8e 100644 --- a/v1/client/protection_runs/get_protection_runs_parameters.go +++ b/v1/client/protection_runs/get_protection_runs_parameters.go @@ -139,6 +139,15 @@ type GetProtectionRunsParams struct { */ JobID *int64 + /* MaxResultCount. + + Identifies the max number of items to be returned. This is specifically + to be used with pagination. + + Format: int64 + */ + MaxResultCount *int64 + /* NumRuns. Specify the number of Job Runs to return. @@ -166,6 +175,12 @@ type GetProtectionRunsParams struct { */ OnlyReturnShellInfo *bool + /* PaginationCookie. + + Pagination cookie to fetch the next set of results. + */ + PaginationCookie *string + /* RunTypes. Filter by run type such as 'kFull', 'kRegular' or 'kLog'. @@ -357,6 +372,17 @@ func (o *GetProtectionRunsParams) SetJobID(jobID *int64) { o.JobID = jobID } +// WithMaxResultCount adds the maxResultCount to the get protection runs params +func (o *GetProtectionRunsParams) WithMaxResultCount(maxResultCount *int64) *GetProtectionRunsParams { + o.SetMaxResultCount(maxResultCount) + return o +} + +// SetMaxResultCount adds the maxResultCount to the get protection runs params +func (o *GetProtectionRunsParams) SetMaxResultCount(maxResultCount *int64) { + o.MaxResultCount = maxResultCount +} + // WithNumRuns adds the numRuns to the get protection runs params func (o *GetProtectionRunsParams) WithNumRuns(numRuns *int64) *GetProtectionRunsParams { o.SetNumRuns(numRuns) @@ -390,6 +416,17 @@ func (o *GetProtectionRunsParams) SetOnlyReturnShellInfo(onlyReturnShellInfo *bo o.OnlyReturnShellInfo = onlyReturnShellInfo } +// WithPaginationCookie adds the paginationCookie to the get protection runs params +func (o *GetProtectionRunsParams) WithPaginationCookie(paginationCookie *string) *GetProtectionRunsParams { + o.SetPaginationCookie(paginationCookie) + return o +} + +// SetPaginationCookie adds the paginationCookie to the get protection runs params +func (o *GetProtectionRunsParams) SetPaginationCookie(paginationCookie *string) { + o.PaginationCookie = paginationCookie +} + // WithRunTypes adds the runTypes to the get protection runs params func (o *GetProtectionRunsParams) WithRunTypes(runTypes []string) *GetProtectionRunsParams { o.SetRunTypes(runTypes) @@ -589,6 +626,23 @@ func (o *GetProtectionRunsParams) WriteToRequest(r runtime.ClientRequest, reg st } } + if o.MaxResultCount != nil { + + // query param maxResultCount + var qrMaxResultCount int64 + + if o.MaxResultCount != nil { + qrMaxResultCount = *o.MaxResultCount + } + qMaxResultCount := swag.FormatInt64(qrMaxResultCount) + if qMaxResultCount != "" { + + if err := r.SetQueryParam("maxResultCount", qMaxResultCount); err != nil { + return err + } + } + } + if o.NumRuns != nil { // query param numRuns @@ -640,6 +694,23 @@ func (o *GetProtectionRunsParams) WriteToRequest(r runtime.ClientRequest, reg st } } + if o.PaginationCookie != nil { + + // query param paginationCookie + var qrPaginationCookie string + + if o.PaginationCookie != nil { + qrPaginationCookie = *o.PaginationCookie + } + qPaginationCookie := qrPaginationCookie + if qPaginationCookie != "" { + + if err := r.SetQueryParam("paginationCookie", qPaginationCookie); err != nil { + return err + } + } + } + if o.RunTypes != nil { // binding items for runTypes diff --git a/v1/models/a_d_domain.go b/v1/models/a_d_domain.go index a2b966d9..470bd6ff 100644 --- a/v1/models/a_d_domain.go +++ b/v1/models/a_d_domain.go @@ -25,14 +25,14 @@ type ADDomain struct { DNSRoot *string `json:"dnsRoot,omitempty"` // Domain functional level numeric. (Get-ADDomain).DomainMode - // Windows2012R2Domain + // Example:Windows2012R2Domain DomainMode *int32 `json:"domainMode,omitempty"` // Forest. Example: qa01.eng.cohesity.com Forest *string `json:"forest,omitempty"` // Forest functional level. (Get-ADForest).ForestMode - // Windows2012R2Forest + // Example:Windows2012R2Forest ForestMode *int32 `json:"forestMode,omitempty"` // Identity of the domain. diff --git a/v1/models/additional_connector_params.go b/v1/models/additional_connector_params.go index bf936625..9d029c27 100644 --- a/v1/models/additional_connector_params.go +++ b/v1/models/additional_connector_params.go @@ -19,6 +19,11 @@ import ( // swagger:model AdditionalConnectorParams type AdditionalConnectorParams struct { + // If set, the cert_cache_ in ConnectorCertificateValidator will not be + // used for this connector conext. + // Specific to agent connector contexts. + DisableCertCache *bool `json:"disableCertCache,omitempty"` + // Endpoint URL for querying the MS graph token fetched from // openid-configuration. GraphTokenEndpoint *string `json:"graphTokenEndpoint,omitempty"` diff --git a/v1/models/agent_certificate_information.go b/v1/models/agent_certificate_information.go index b28b4bcb..cae727a7 100644 --- a/v1/models/agent_certificate_information.go +++ b/v1/models/agent_certificate_information.go @@ -20,6 +20,12 @@ type AgentCertificateInformation struct { // cert type CertType *int32 `json:"certType,omitempty"` + // cipher str + CipherStr *string `json:"cipherStr,omitempty"` + + // cipher type + CipherType *int32 `json:"cipherType,omitempty"` + // Expiry time for the certificate. ExpiryTimeEpoch *uint64 `json:"expiryTimeEpoch,omitempty"` } diff --git a/v1/models/agent_deployment_status_response.go b/v1/models/agent_deployment_status_response.go index b47ea585..845abd3f 100644 --- a/v1/models/agent_deployment_status_response.go +++ b/v1/models/agent_deployment_status_response.go @@ -22,6 +22,9 @@ import ( // swagger:model AgentDeploymentStatusResponse type AgentDeploymentStatusResponse struct { + // Specifies the port agent is listening on. + AgentPort *int32 `json:"agentPort,omitempty"` + // Specifies the certificate expiry time for agent. CertificateExpiryTimeUsecs *int64 `json:"certificateExpiryTimeUsecs,omitempty"` @@ -33,6 +36,9 @@ type AgentDeploymentStatusResponse struct { // Enum: ["Active","Expired"] CertificateStatus *string `json:"certificateStatus,omitempty"` + // Specifies cipher type being used by the agent. + CipherType *string `json:"cipherType,omitempty"` + // Specifies the compact version of Cohesity agent. For example, 6.0.1. CompactVersion *string `json:"compactVersion,omitempty"` diff --git a/v1/models/app_entity_backup_status_info.go b/v1/models/app_entity_backup_status_info.go index 73deafd6..7948001b 100644 --- a/v1/models/app_entity_backup_status_info.go +++ b/v1/models/app_entity_backup_status_info.go @@ -34,7 +34,7 @@ type AppEntityBackupStatusInfo struct { Name *string `json:"name,omitempty"` // Specifies the owner id of the the app. Owner is the host under which - // the app is located. SQL DB entities can be hosted by Physicals can be hosted by Physical can be hosted by Physical entities can be hosted by Physical + // the app is located. Example: SQL DB entities can be hosted by Physical // host or virtual machine. OwnerID *int64 `json:"ownerId,omitempty"` diff --git a/v1/models/aws_protection_source.go b/v1/models/aws_protection_source.go index 41b95e70..e725f29a 100644 --- a/v1/models/aws_protection_source.go +++ b/v1/models/aws_protection_source.go @@ -157,6 +157,9 @@ type AwsProtectionSource struct { // Specifies S3 entity specific params. S3EntityInfo *S3EntityInfo `json:"s3EntityInfo,omitempty"` + // Params required for s3 backups for the registered entity. + S3ProtectionParams *S3ProtectionParams `json:"s3ProtectionParams,omitempty"` + // Specifies Secret Access key of the AWS account. SecretAccessKey *string `json:"secretAccessKey,omitempty"` @@ -244,6 +247,10 @@ func (m *AwsProtectionSource) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateS3ProtectionParams(formats); err != nil { + res = append(res, err) + } + if err := m.validateSubscriptionType(formats); err != nil { res = append(res, err) } @@ -579,6 +586,25 @@ func (m *AwsProtectionSource) validateS3EntityInfo(formats strfmt.Registry) erro return nil } +func (m *AwsProtectionSource) validateS3ProtectionParams(formats strfmt.Registry) error { + if swag.IsZero(m.S3ProtectionParams) { // not required + return nil + } + + if m.S3ProtectionParams != nil { + if err := m.S3ProtectionParams.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("s3ProtectionParams") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("s3ProtectionParams") + } + return err + } + } + + return nil +} + var awsProtectionSourceTypeSubscriptionTypePropEnum []interface{} func init() { @@ -795,6 +821,10 @@ func (m *AwsProtectionSource) ContextValidate(ctx context.Context, formats strfm res = append(res, err) } + if err := m.contextValidateS3ProtectionParams(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateTagAttributes(ctx, formats); err != nil { res = append(res, err) } @@ -893,6 +923,27 @@ func (m *AwsProtectionSource) contextValidateS3EntityInfo(ctx context.Context, f return nil } +func (m *AwsProtectionSource) contextValidateS3ProtectionParams(ctx context.Context, formats strfmt.Registry) error { + + if m.S3ProtectionParams != nil { + + if swag.IsZero(m.S3ProtectionParams) { // not required + return nil + } + + if err := m.S3ProtectionParams.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("s3ProtectionParams") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("s3ProtectionParams") + } + return err + } + } + + return nil +} + func (m *AwsProtectionSource) contextValidateTagAttributes(ctx context.Context, formats strfmt.Registry) error { for i := 0; i < len(m.TagAttributes); i++ { diff --git a/v1/models/backup_job_run_state_proto.go b/v1/models/backup_job_run_state_proto.go index e455551c..36e7bbaa 100644 --- a/v1/models/backup_job_run_state_proto.go +++ b/v1/models/backup_job_run_state_proto.go @@ -156,6 +156,9 @@ type BackupJobRunStateProto struct { // Number of backup tasks that were successful in the run so far. NumSuccessfulTasks *int64 `json:"numSuccessfulTasks,omitempty"` + // This will be set if this corresponds to a out-of-band backup run request. + OobUID *UniversalIDProto `json:"oobUid,omitempty"` + // The name of the original cluster on which this run executed. OriginClusterName *string `json:"originClusterName,omitempty"` @@ -278,6 +281,10 @@ func (m *BackupJobRunStateProto) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateOobUID(formats); err != nil { + res = append(res, err) + } + if err := m.validateRetentionPolicy(formats); err != nil { res = append(res, err) } @@ -533,6 +540,25 @@ func (m *BackupJobRunStateProto) validateLatestFinishedTasks(formats strfmt.Regi return nil } +func (m *BackupJobRunStateProto) validateOobUID(formats strfmt.Registry) error { + if swag.IsZero(m.OobUID) { // not required + return nil + } + + if m.OobUID != nil { + if err := m.OobUID.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("oobUid") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("oobUid") + } + return err + } + } + + return nil +} + func (m *BackupJobRunStateProto) validateRetentionPolicy(formats strfmt.Registry) error { if swag.IsZero(m.RetentionPolicy) { // not required return nil @@ -712,6 +738,10 @@ func (m *BackupJobRunStateProto) ContextValidate(ctx context.Context, formats st res = append(res, err) } + if err := m.contextValidateOobUID(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateRetentionPolicy(ctx, formats); err != nil { res = append(res, err) } @@ -972,6 +1002,27 @@ func (m *BackupJobRunStateProto) contextValidateLatestFinishedTasks(ctx context. return nil } +func (m *BackupJobRunStateProto) contextValidateOobUID(ctx context.Context, formats strfmt.Registry) error { + + if m.OobUID != nil { + + if swag.IsZero(m.OobUID) { // not required + return nil + } + + if err := m.OobUID.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("oobUid") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("oobUid") + } + return err + } + } + + return nil +} + func (m *BackupJobRunStateProto) contextValidateRetentionPolicy(ctx context.Context, formats strfmt.Registry) error { if m.RetentionPolicy != nil { diff --git a/v1/models/backup_script.go b/v1/models/backup_script.go index 18e477aa..a6faeb02 100644 --- a/v1/models/backup_script.go +++ b/v1/models/backup_script.go @@ -21,17 +21,45 @@ import ( // swagger:model BackupScript type BackupScript struct { - // full backup script - FullBackupScript *BackupScriptFullBackupScript `json:"fullBackupScript,omitempty"` - - // incremental backup script - IncrementalBackupScript *BackupScriptIncrementalBackupScript `json:"incrementalBackupScript,omitempty"` - - // log backup script - LogBackupScript *BackupScriptLogBackupScript `json:"logBackupScript,omitempty"` - - // remote host - RemoteHost *BackupScriptRemoteHost `json:"remoteHost,omitempty"` + // Full (No CBT) Script. + // + // Specifies the script that should run for the Full (no CBT) backup schedule + // of a Remote Adapter 'kPuppeteer' Job. + // This field is mandatory if the Policy associated with this Job + // has a Full (no CBT) backup schedule and this is Remote Adapter + // 'kPuppeteer' Job. + FullBackupScript struct { + RemoteScriptPathAndParams + } `json:"fullBackupScript,omitempty"` + + // CBT-based Script. + // + // Specifies the script that should run for the CBT-based backup + // schedule of a Remote Adapter 'kPuppeteer' Job. A CBT-based backup + // schedule is utilizing Change Block Tracking when capturing Snapshots. + // This field is mandatory if the Policy associated with this Job + // has a CBT-based backup schedule and this is Remote Adapter + // 'kPuppeteer' Job. + IncrementalBackupScript struct { + RemoteScriptPathAndParams + } `json:"incrementalBackupScript,omitempty"` + + // Log Script. + // + // Specifies the script that should run for the Log backup schedule + // of a Remote Adapter 'kPuppeteer' Job. + // This field is mandatory if the Policy associated with this Job + // has a Log backup schedule and this is Remote Adapter + // 'kPuppeteer' Job. + LogBackupScript struct { + RemoteScriptPathAndParams + } `json:"logBackupScript,omitempty"` + + // Specifies the remote host where the remote scripts are executed. + // This field must be set for Remote Adapter Jobs. + RemoteHost struct { + RemoteHost + } `json:"remoteHost,omitempty"` // Specifies the username that will be used to login to the remote host. // For host type 'kLinux', it is expected that user has setup the @@ -70,17 +98,6 @@ func (m *BackupScript) validateFullBackupScript(formats strfmt.Registry) error { return nil } - if m.FullBackupScript != nil { - if err := m.FullBackupScript.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fullBackupScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fullBackupScript") - } - return err - } - } - return nil } @@ -89,17 +106,6 @@ func (m *BackupScript) validateIncrementalBackupScript(formats strfmt.Registry) return nil } - if m.IncrementalBackupScript != nil { - if err := m.IncrementalBackupScript.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("incrementalBackupScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("incrementalBackupScript") - } - return err - } - } - return nil } @@ -108,17 +114,6 @@ func (m *BackupScript) validateLogBackupScript(formats strfmt.Registry) error { return nil } - if m.LogBackupScript != nil { - if err := m.LogBackupScript.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("logBackupScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("logBackupScript") - } - return err - } - } - return nil } @@ -127,17 +122,6 @@ func (m *BackupScript) validateRemoteHost(formats strfmt.Registry) error { return nil } - if m.RemoteHost != nil { - if err := m.RemoteHost.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("remoteHost") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("remoteHost") - } - return err - } - } - return nil } @@ -169,85 +153,21 @@ func (m *BackupScript) ContextValidate(ctx context.Context, formats strfmt.Regis func (m *BackupScript) contextValidateFullBackupScript(ctx context.Context, formats strfmt.Registry) error { - if m.FullBackupScript != nil { - - if swag.IsZero(m.FullBackupScript) { // not required - return nil - } - - if err := m.FullBackupScript.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fullBackupScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fullBackupScript") - } - return err - } - } - return nil } func (m *BackupScript) contextValidateIncrementalBackupScript(ctx context.Context, formats strfmt.Registry) error { - if m.IncrementalBackupScript != nil { - - if swag.IsZero(m.IncrementalBackupScript) { // not required - return nil - } - - if err := m.IncrementalBackupScript.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("incrementalBackupScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("incrementalBackupScript") - } - return err - } - } - return nil } func (m *BackupScript) contextValidateLogBackupScript(ctx context.Context, formats strfmt.Registry) error { - if m.LogBackupScript != nil { - - if swag.IsZero(m.LogBackupScript) { // not required - return nil - } - - if err := m.LogBackupScript.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("logBackupScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("logBackupScript") - } - return err - } - } - return nil } func (m *BackupScript) contextValidateRemoteHost(ctx context.Context, formats strfmt.Registry) error { - if m.RemoteHost != nil { - - if swag.IsZero(m.RemoteHost) { // not required - return nil - } - - if err := m.RemoteHost.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("remoteHost") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("remoteHost") - } - return err - } - } - return nil } diff --git a/v1/models/backup_script_full_backup_script.go b/v1/models/backup_script_full_backup_script.go deleted file mode 100644 index 9cd135da..00000000 --- a/v1/models/backup_script_full_backup_script.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// BackupScriptFullBackupScript Full (No CBT) Script. -// -// Specifies the script that should run for the Full (no CBT) backup schedule -// of a Remote Adapter 'kPuppeteer' Job. -// This field is mandatory if the Policy associated with this Job -// has a Full (no CBT) backup schedule and this is Remote Adapter -// 'kPuppeteer' Job. -// -// swagger:model backupScriptFullBackupScript -type BackupScriptFullBackupScript struct { - RemoteScriptPathAndParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *BackupScriptFullBackupScript) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 RemoteScriptPathAndParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.RemoteScriptPathAndParams = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m BackupScriptFullBackupScript) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.RemoteScriptPathAndParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this backup script full backup script -func (m *BackupScriptFullBackupScript) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with RemoteScriptPathAndParams - if err := m.RemoteScriptPathAndParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this backup script full backup script based on the context it is used -func (m *BackupScriptFullBackupScript) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with RemoteScriptPathAndParams - if err := m.RemoteScriptPathAndParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *BackupScriptFullBackupScript) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BackupScriptFullBackupScript) UnmarshalBinary(b []byte) error { - var res BackupScriptFullBackupScript - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/backup_script_incremental_backup_script.go b/v1/models/backup_script_incremental_backup_script.go deleted file mode 100644 index b4f8b50d..00000000 --- a/v1/models/backup_script_incremental_backup_script.go +++ /dev/null @@ -1,100 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// BackupScriptIncrementalBackupScript CBT-based Script. -// -// Specifies the script that should run for the CBT-based backup -// schedule of a Remote Adapter 'kPuppeteer' Job. A CBT-based backup -// schedule is utilizing Change Block Tracking when capturing Snapshots. -// This field is mandatory if the Policy associated with this Job -// has a CBT-based backup schedule and this is Remote Adapter -// 'kPuppeteer' Job. -// -// swagger:model backupScriptIncrementalBackupScript -type BackupScriptIncrementalBackupScript struct { - RemoteScriptPathAndParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *BackupScriptIncrementalBackupScript) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 RemoteScriptPathAndParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.RemoteScriptPathAndParams = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m BackupScriptIncrementalBackupScript) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.RemoteScriptPathAndParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this backup script incremental backup script -func (m *BackupScriptIncrementalBackupScript) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with RemoteScriptPathAndParams - if err := m.RemoteScriptPathAndParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this backup script incremental backup script based on the context it is used -func (m *BackupScriptIncrementalBackupScript) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with RemoteScriptPathAndParams - if err := m.RemoteScriptPathAndParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *BackupScriptIncrementalBackupScript) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BackupScriptIncrementalBackupScript) UnmarshalBinary(b []byte) error { - var res BackupScriptIncrementalBackupScript - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/backup_script_log_backup_script.go b/v1/models/backup_script_log_backup_script.go deleted file mode 100644 index f83c3d68..00000000 --- a/v1/models/backup_script_log_backup_script.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// BackupScriptLogBackupScript Log Script. -// -// Specifies the script that should run for the Log backup schedule -// of a Remote Adapter 'kPuppeteer' Job. -// This field is mandatory if the Policy associated with this Job -// has a Log backup schedule and this is Remote Adapter -// 'kPuppeteer' Job. -// -// swagger:model backupScriptLogBackupScript -type BackupScriptLogBackupScript struct { - RemoteScriptPathAndParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *BackupScriptLogBackupScript) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 RemoteScriptPathAndParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.RemoteScriptPathAndParams = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m BackupScriptLogBackupScript) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.RemoteScriptPathAndParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this backup script log backup script -func (m *BackupScriptLogBackupScript) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with RemoteScriptPathAndParams - if err := m.RemoteScriptPathAndParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this backup script log backup script based on the context it is used -func (m *BackupScriptLogBackupScript) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with RemoteScriptPathAndParams - if err := m.RemoteScriptPathAndParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *BackupScriptLogBackupScript) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BackupScriptLogBackupScript) UnmarshalBinary(b []byte) error { - var res BackupScriptLogBackupScript - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/backup_script_remote_host.go b/v1/models/backup_script_remote_host.go deleted file mode 100644 index e141fb20..00000000 --- a/v1/models/backup_script_remote_host.go +++ /dev/null @@ -1,94 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// BackupScriptRemoteHost Specifies the remote host where the remote scripts are executed. -// This field must be set for Remote Adapter Jobs. -// -// swagger:model backupScriptRemoteHost -type BackupScriptRemoteHost struct { - RemoteHost -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *BackupScriptRemoteHost) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 RemoteHost - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.RemoteHost = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m BackupScriptRemoteHost) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.RemoteHost) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this backup script remote host -func (m *BackupScriptRemoteHost) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with RemoteHost - if err := m.RemoteHost.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this backup script remote host based on the context it is used -func (m *BackupScriptRemoteHost) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with RemoteHost - if err := m.RemoteHost.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *BackupScriptRemoteHost) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BackupScriptRemoteHost) UnmarshalBinary(b []byte) error { - var res BackupScriptRemoteHost - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/bifrost_config.go b/v1/models/bifrost_config.go index d54eda4e..b79258d0 100644 --- a/v1/models/bifrost_config.go +++ b/v1/models/bifrost_config.go @@ -50,8 +50,16 @@ type BifrostConfig struct { // DELETING State *string `json:"state,omitempty"` - // subnet - Subnet *BifrostConfigSubnet `json:"subnet,omitempty"` + // Subnet. + // + // Specifies the subnet of the VLAN. + // The netmask can be specified by setting netmaskBits or netmaskIp4. + // The netmask can only be set using netmaskIp4 if the IP address is + // an IPv4 address. It can carry V4 or V6 in case of requests, and carries + // V4 in case of response. + Subnet struct { + BifrostSubnet + } `json:"subnet,omitempty"` // Specifies the tenant id that this vlan belongs to. TenantID *string `json:"tenantId,omitempty"` @@ -84,17 +92,6 @@ func (m *BifrostConfig) validateSubnet(formats strfmt.Registry) error { return nil } - if m.Subnet != nil { - if err := m.Subnet.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("subnet") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("subnet") - } - return err - } - } - return nil } @@ -114,22 +111,6 @@ func (m *BifrostConfig) ContextValidate(ctx context.Context, formats strfmt.Regi func (m *BifrostConfig) contextValidateSubnet(ctx context.Context, formats strfmt.Registry) error { - if m.Subnet != nil { - - if swag.IsZero(m.Subnet) { // not required - return nil - } - - if err := m.Subnet.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("subnet") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("subnet") - } - return err - } - } - return nil } diff --git a/v1/models/bifrost_config_subnet.go b/v1/models/bifrost_config_subnet.go deleted file mode 100644 index 3d053d48..00000000 --- a/v1/models/bifrost_config_subnet.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// BifrostConfigSubnet Subnet. -// -// Specifies the subnet of the VLAN. -// The netmask can be specified by setting netmaskBits or netmaskIp4. -// The netmask can only be set using netmaskIp4 if the IP address is -// an IPv4 address. It can carry V4 or V6 in case of requests, and carries -// V4 in case of response. -// -// swagger:model bifrostConfigSubnet -type BifrostConfigSubnet struct { - BifrostSubnet -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *BifrostConfigSubnet) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 BifrostSubnet - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.BifrostSubnet = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m BifrostConfigSubnet) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.BifrostSubnet) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this bifrost config subnet -func (m *BifrostConfigSubnet) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with BifrostSubnet - if err := m.BifrostSubnet.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this bifrost config subnet based on the context it is used -func (m *BifrostConfigSubnet) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with BifrostSubnet - if err := m.BifrostSubnet.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *BifrostConfigSubnet) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BifrostConfigSubnet) UnmarshalBinary(b []byte) error { - var res BifrostConfigSubnet - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/blackout_period.go b/v1/models/blackout_period.go index 189afaab..6ebff9cb 100644 --- a/v1/models/blackout_period.go +++ b/v1/models/blackout_period.go @@ -37,11 +37,19 @@ type BlackoutPeriod struct { // Enum: ["kSunday","kMonday","kTuesday","kWednesday","kThursday","kFriday","kSaturday"] Day *string `json:"day,omitempty"` - // end time - EndTime *BlackoutPeriodEndTime `json:"endTime,omitempty"` + // QuietTime End Time. + // + // Specifies the end time of the QuietTime time range. + EndTime struct { + TimeOfDay + } `json:"endTime,omitempty"` - // start time - StartTime *BlackoutPeriodStartTime `json:"startTime,omitempty"` + // QuietTime Start Time. + // + // Specifies the start time of the QuietTime time range. + StartTime struct { + TimeOfDay + } `json:"startTime,omitempty"` } // Validate validates this blackout period @@ -128,17 +136,6 @@ func (m *BlackoutPeriod) validateEndTime(formats strfmt.Registry) error { return nil } - if m.EndTime != nil { - if err := m.EndTime.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("endTime") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("endTime") - } - return err - } - } - return nil } @@ -147,17 +144,6 @@ func (m *BlackoutPeriod) validateStartTime(formats strfmt.Registry) error { return nil } - if m.StartTime != nil { - if err := m.StartTime.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("startTime") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("startTime") - } - return err - } - } - return nil } @@ -181,43 +167,11 @@ func (m *BlackoutPeriod) ContextValidate(ctx context.Context, formats strfmt.Reg func (m *BlackoutPeriod) contextValidateEndTime(ctx context.Context, formats strfmt.Registry) error { - if m.EndTime != nil { - - if swag.IsZero(m.EndTime) { // not required - return nil - } - - if err := m.EndTime.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("endTime") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("endTime") - } - return err - } - } - return nil } func (m *BlackoutPeriod) contextValidateStartTime(ctx context.Context, formats strfmt.Registry) error { - if m.StartTime != nil { - - if swag.IsZero(m.StartTime) { // not required - return nil - } - - if err := m.StartTime.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("startTime") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("startTime") - } - return err - } - } - return nil } diff --git a/v1/models/blackout_period_end_time.go b/v1/models/blackout_period_end_time.go deleted file mode 100644 index 388023b9..00000000 --- a/v1/models/blackout_period_end_time.go +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// BlackoutPeriodEndTime QuietTime End Time. -// -// Specifies the end time of the QuietTime time range. -// -// swagger:model blackoutPeriodEndTime -type BlackoutPeriodEndTime struct { - TimeOfDay -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *BlackoutPeriodEndTime) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 TimeOfDay - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.TimeOfDay = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m BlackoutPeriodEndTime) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.TimeOfDay) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this blackout period end time -func (m *BlackoutPeriodEndTime) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with TimeOfDay - if err := m.TimeOfDay.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this blackout period end time based on the context it is used -func (m *BlackoutPeriodEndTime) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with TimeOfDay - if err := m.TimeOfDay.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *BlackoutPeriodEndTime) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BlackoutPeriodEndTime) UnmarshalBinary(b []byte) error { - var res BlackoutPeriodEndTime - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/blackout_period_start_time.go b/v1/models/blackout_period_start_time.go deleted file mode 100644 index 4b0b33f0..00000000 --- a/v1/models/blackout_period_start_time.go +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// BlackoutPeriodStartTime QuietTime Start Time. -// -// Specifies the start time of the QuietTime time range. -// -// swagger:model blackoutPeriodStartTime -type BlackoutPeriodStartTime struct { - TimeOfDay -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *BlackoutPeriodStartTime) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 TimeOfDay - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.TimeOfDay = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m BlackoutPeriodStartTime) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.TimeOfDay) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this blackout period start time -func (m *BlackoutPeriodStartTime) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with TimeOfDay - if err := m.TimeOfDay.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this blackout period start time based on the context it is used -func (m *BlackoutPeriodStartTime) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with TimeOfDay - if err := m.TimeOfDay.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *BlackoutPeriodStartTime) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BlackoutPeriodStartTime) UnmarshalBinary(b []byte) error { - var res BlackoutPeriodStartTime - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cassandra_connect_params.go b/v1/models/cassandra_connect_params.go index 4ee5f1d5..19bf0d30 100644 --- a/v1/models/cassandra_connect_params.go +++ b/v1/models/cassandra_connect_params.go @@ -47,6 +47,9 @@ type CassandraConnectParams struct { // Specifies the Directory from where DSE specific configuration can be read. DseConfigDirectory *string `json:"dseConfigDirectory,omitempty"` + // DSE version + DseVersion *string `json:"dseVersion,omitempty"` + // Specifies whether this cluster has DSE Authenticator. IsDseAuthenticator *bool `json:"isDseAuthenticator,omitempty"` diff --git a/v1/models/clone_task_request.go b/v1/models/clone_task_request.go index 3afc5564..777d9906 100644 --- a/v1/models/clone_task_request.go +++ b/v1/models/clone_task_request.go @@ -23,8 +23,13 @@ import ( // swagger:model CloneTaskRequest type CloneTaskRequest struct { - // clone view parameters - CloneViewParameters *CloneTaskRequestCloneViewParameters `json:"cloneViewParameters,omitempty"` + // Clone View. + // + // Specifies settings for cloning an existing View. + // This field is required for a 'kCloneView' Restore Task. + CloneViewParameters struct { + CloneViewRequest + } `json:"cloneViewParameters,omitempty"` // Specifies if the Restore Task should continue when some operations on some // objects fail. If true, the Cohesity Cluster ignores intermittent @@ -135,17 +140,6 @@ func (m *CloneTaskRequest) validateCloneViewParameters(formats strfmt.Registry) return nil } - if m.CloneViewParameters != nil { - if err := m.CloneViewParameters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloneViewParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloneViewParameters") - } - return err - } - } - return nil } @@ -361,22 +355,6 @@ func (m *CloneTaskRequest) ContextValidate(ctx context.Context, formats strfmt.R func (m *CloneTaskRequest) contextValidateCloneViewParameters(ctx context.Context, formats strfmt.Registry) error { - if m.CloneViewParameters != nil { - - if swag.IsZero(m.CloneViewParameters) { // not required - return nil - } - - if err := m.CloneViewParameters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloneViewParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloneViewParameters") - } - return err - } - } - return nil } diff --git a/v1/models/clone_task_request_clone_view_parameters.go b/v1/models/clone_task_request_clone_view_parameters.go deleted file mode 100644 index 43b8c88e..00000000 --- a/v1/models/clone_task_request_clone_view_parameters.go +++ /dev/null @@ -1,96 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CloneTaskRequestCloneViewParameters Clone View. -// -// Specifies settings for cloning an existing View. -// This field is required for a 'kCloneView' Restore Task. -// -// swagger:model cloneTaskRequestCloneViewParameters -type CloneTaskRequestCloneViewParameters struct { - CloneViewRequest -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *CloneTaskRequestCloneViewParameters) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CloneViewRequest - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CloneViewRequest = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m CloneTaskRequestCloneViewParameters) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.CloneViewRequest) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this clone task request clone view parameters -func (m *CloneTaskRequestCloneViewParameters) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CloneViewRequest - if err := m.CloneViewRequest.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this clone task request clone view parameters based on the context it is used -func (m *CloneTaskRequestCloneViewParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CloneViewRequest - if err := m.CloneViewRequest.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *CloneTaskRequestCloneViewParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CloneTaskRequestCloneViewParameters) UnmarshalBinary(b []byte) error { - var res CloneTaskRequestCloneViewParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/clone_view_request.go b/v1/models/clone_view_request.go index db40c758..df25b1d5 100644 --- a/v1/models/clone_view_request.go +++ b/v1/models/clone_view_request.go @@ -108,8 +108,24 @@ type CloneViewRequest struct { // write to this view if this is set to true. IsReadOnly *bool `json:"isReadOnly,omitempty"` - // logical quota - LogicalQuota *CloneViewRequestLogicalQuota `json:"logicalQuota,omitempty"` + // Specifies an optional logical quota limit (in bytes) for the usage allowed + // on this View. + // (Logical data is when the data is fully hydrated and expanded.) + // This limit overrides the limit inherited from the Storage Domain + // (View Box) (if set). + // If logicalQuota is nil, the limit is inherited from the + // Storage Domain (View Box) (if set). + // A new write is not allowed if the Storage Domain (View Box) will exceed the + // specified quota. + // However, it takes time for the Cohesity Cluster to calculate + // the usage across Nodes, so the limit may be exceeded by a small amount. + // In addition, if the limit is increased or data is removed, + // there may be a delay before the Cohesity Cluster allows more data + // to be written to the View, as the Cluster is calculating the usage + // across Nodes. + LogicalQuota struct { + QuotaPolicy + } `json:"logicalQuota,omitempty"` // Array of Netgroups. // @@ -135,7 +151,7 @@ type CloneViewRequest struct { // global setting. OverrideGlobalWhitelist *bool `json:"overrideGlobalWhitelist,omitempty"` - // Specifies the supported Protocols for the View. + // Deprecated: Specifies the supported Protocols for the View. // 'kAll' enables protocol access to following three views: NFS, SMB and S3. // 'kNFSOnly' enables protocol access to NFS only. // 'kSMBOnly' enables protocol access to SMB only. @@ -195,6 +211,9 @@ type CloneViewRequest struct { // Specifies the pinning config of this view. ViewPinningConfig *ViewPinningConfig `json:"viewPinningConfig,omitempty"` + + // Specifies the supported Protocols for the View. + ViewProtocol []*ViewProtocol `json:"viewProtocol"` } // Validate validates this clone view request @@ -265,6 +284,10 @@ func (m *CloneViewRequest) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateViewProtocol(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -333,17 +356,6 @@ func (m *CloneViewRequest) validateLogicalQuota(formats strfmt.Registry) error { return nil } - if m.LogicalQuota != nil { - if err := m.LogicalQuota.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("logicalQuota") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("logicalQuota") - } - return err - } - } - return nil } @@ -657,6 +669,32 @@ func (m *CloneViewRequest) validateViewPinningConfig(formats strfmt.Registry) er return nil } +func (m *CloneViewRequest) validateViewProtocol(formats strfmt.Registry) error { + if swag.IsZero(m.ViewProtocol) { // not required + return nil + } + + for i := 0; i < len(m.ViewProtocol); i++ { + if swag.IsZero(m.ViewProtocol[i]) { // not required + continue + } + + if m.ViewProtocol[i] != nil { + if err := m.ViewProtocol[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("viewProtocol" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("viewProtocol" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + // ContextValidate validate this clone view request based on the context it is used func (m *CloneViewRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error @@ -717,6 +755,10 @@ func (m *CloneViewRequest) ContextValidate(ctx context.Context, formats strfmt.R res = append(res, err) } + if err := m.contextValidateViewProtocol(ctx, formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -788,22 +830,6 @@ func (m *CloneViewRequest) contextValidateFileLockConfig(ctx context.Context, fo func (m *CloneViewRequest) contextValidateLogicalQuota(ctx context.Context, formats strfmt.Registry) error { - if m.LogicalQuota != nil { - - if swag.IsZero(m.LogicalQuota) { // not required - return nil - } - - if err := m.LogicalQuota.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("logicalQuota") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("logicalQuota") - } - return err - } - } - return nil } @@ -1029,6 +1055,31 @@ func (m *CloneViewRequest) contextValidateViewPinningConfig(ctx context.Context, return nil } +func (m *CloneViewRequest) contextValidateViewProtocol(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.ViewProtocol); i++ { + + if m.ViewProtocol[i] != nil { + + if swag.IsZero(m.ViewProtocol[i]) { // not required + return nil + } + + if err := m.ViewProtocol[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("viewProtocol" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("viewProtocol" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + // MarshalBinary interface implementation func (m *CloneViewRequest) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/v1/models/clone_view_request_logical_quota.go b/v1/models/clone_view_request_logical_quota.go deleted file mode 100644 index 1282862a..00000000 --- a/v1/models/clone_view_request_logical_quota.go +++ /dev/null @@ -1,107 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CloneViewRequestLogicalQuota Specifies an optional logical quota limit (in bytes) for the usage allowed -// on this View. -// (Logical data is when the data is fully hydrated and expanded.) -// This limit overrides the limit inherited from the Storage Domain -// (View Box) (if set). -// If logicalQuota is nil, the limit is inherited from the -// Storage Domain (View Box) (if set). -// A new write is not allowed if the Storage Domain (View Box) will exceed the -// specified quota. -// However, it takes time for the Cohesity Cluster to calculate -// the usage across Nodes, so the limit may be exceeded by a small amount. -// In addition, if the limit is increased or data is removed, -// there may be a delay before the Cohesity Cluster allows more data -// to be written to the View, as the Cluster is calculating the usage -// across Nodes. -// -// swagger:model cloneViewRequestLogicalQuota -type CloneViewRequestLogicalQuota struct { - QuotaPolicy -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *CloneViewRequestLogicalQuota) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 QuotaPolicy - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.QuotaPolicy = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m CloneViewRequestLogicalQuota) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.QuotaPolicy) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this clone view request logical quota -func (m *CloneViewRequestLogicalQuota) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with QuotaPolicy - if err := m.QuotaPolicy.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this clone view request logical quota based on the context it is used -func (m *CloneViewRequestLogicalQuota) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with QuotaPolicy - if err := m.QuotaPolicy.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *CloneViewRequestLogicalQuota) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CloneViewRequestLogicalQuota) UnmarshalBinary(b []byte) error { - var res CloneViewRequestLogicalQuota - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cluster.go b/v1/models/cluster.go index a62d3ec7..a262e642 100644 --- a/v1/models/cluster.go +++ b/v1/models/cluster.go @@ -35,6 +35,9 @@ type Cluster struct { // Specifies the number of racks in cluster with at least one rack assigned. AssignedRacksCount *int32 `json:"assignedRacksCount,omitempty"` + // To attempt agent connection on port 21213 first + AttemptAgentPortsUpgrade *bool `json:"attemptAgentPortsUpgrade,omitempty"` + // Information about storage available for metadata AvailableMetadataSpace *int64 `json:"availableMetadataSpace,omitempty"` @@ -147,8 +150,12 @@ type Cluster struct { // (30 days). EncryptionKeyRotationPeriodSecs *int64 `json:"encryptionKeyRotationPeriodSecs,omitempty"` - // eula config - EulaConfig *ClusterEulaConfig `json:"eulaConfig,omitempty"` + // EULA Acceptance Information. + // + // Specifies the End User License Agreement (EULA) acceptance information. + EulaConfig struct { + EulaConfig + } `json:"eulaConfig,omitempty"` // Specifies the level which 'MetadataFaultToleranceFactor' applies to. // 'kNode' indicates 'MetadataFaultToleranceFactor' applies to Node level. @@ -215,8 +222,12 @@ type Cluster struct { // Specifies the language and locale for this Cohesity Cluster. LanguageLocale *string `json:"languageLocale,omitempty"` - // license state - LicenseState *ClusterLicenseState `json:"licenseState,omitempty"` + // License State Information. + // + // Specifies the Licensing State information. + LicenseState struct { + LicenseState + } `json:"licenseState,omitempty"` // Domain name for SMB local authentication. LocalAuthDomainName *string `json:"localAuthDomainName,omitempty"` @@ -336,6 +347,9 @@ type Cluster struct { // Error string to capture why the upgrade failed. UpgradeFailureErrorString *string `json:"upgradeFailureErrorString,omitempty"` + // To use default ports 50051 & 21213 + UseDefaultAgentPorts *bool `json:"useDefaultAgentPorts,omitempty"` + // Specifies whether to enable Heimdall which tells whether services should // use temporary fleet instances to mount disks by talking to Heimdall. UseHeimdall *bool `json:"useHeimdall,omitempty"` @@ -720,17 +734,6 @@ func (m *Cluster) validateEulaConfig(formats strfmt.Registry) error { return nil } - if m.EulaConfig != nil { - if err := m.EulaConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("eulaConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("eulaConfig") - } - return err - } - } - return nil } @@ -822,17 +825,6 @@ func (m *Cluster) validateLicenseState(formats strfmt.Registry) error { return nil } - if m.LicenseState != nil { - if err := m.LicenseState.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("licenseState") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("licenseState") - } - return err - } - } - return nil } @@ -1124,22 +1116,6 @@ func (m *Cluster) contextValidateDiskCountByTier(ctx context.Context, formats st func (m *Cluster) contextValidateEulaConfig(ctx context.Context, formats strfmt.Registry) error { - if m.EulaConfig != nil { - - if swag.IsZero(m.EulaConfig) { // not required - return nil - } - - if err := m.EulaConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("eulaConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("eulaConfig") - } - return err - } - } - return nil } @@ -1187,22 +1163,6 @@ func (m *Cluster) contextValidateHardwareInfo(ctx context.Context, formats strfm func (m *Cluster) contextValidateLicenseState(ctx context.Context, formats strfmt.Registry) error { - if m.LicenseState != nil { - - if swag.IsZero(m.LicenseState) { // not required - return nil - } - - if err := m.LicenseState.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("licenseState") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("licenseState") - } - return err - } - } - return nil } diff --git a/v1/models/cluster_config_proto_vault_cloud_tier_info.go b/v1/models/cluster_config_proto_vault_cloud_tier_info.go index 8cd24473..de03e699 100644 --- a/v1/models/cluster_config_proto_vault_cloud_tier_info.go +++ b/v1/models/cluster_config_proto_vault_cloud_tier_info.go @@ -25,7 +25,7 @@ type ClusterConfigProtoVaultCloudTierInfo struct { // Represents the number of seconds since the snapshot first got archived // (to default tier) after which it needs to be moved to the target tier. - // For example, if user selects target as an AWS vault (S3 tier is default) + // For example, if user selects target as an AWS vault (default: S3 tier) // with 3 months retention, move to glacier after 1 month, and move to // deep glacier after 2 months, then the below field should be set to // appropriate number of seconds corresponding to 1 or 2 months by iris. diff --git a/v1/models/cluster_eula_config.go b/v1/models/cluster_eula_config.go deleted file mode 100644 index 846abe5d..00000000 --- a/v1/models/cluster_eula_config.go +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ClusterEulaConfig EULA Acceptance Information. -// -// Specifies the End User License Agreement (EULA) acceptance information. -// -// swagger:model clusterEulaConfig -type ClusterEulaConfig struct { - EulaConfig -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ClusterEulaConfig) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 EulaConfig - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.EulaConfig = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ClusterEulaConfig) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.EulaConfig) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this cluster eula config -func (m *ClusterEulaConfig) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with EulaConfig - if err := m.EulaConfig.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this cluster eula config based on the context it is used -func (m *ClusterEulaConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with EulaConfig - if err := m.EulaConfig.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterEulaConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterEulaConfig) UnmarshalBinary(b []byte) error { - var res ClusterEulaConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cluster_license_state.go b/v1/models/cluster_license_state.go deleted file mode 100644 index 71dd6a1a..00000000 --- a/v1/models/cluster_license_state.go +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ClusterLicenseState License State Information. -// -// Specifies the Licensing State information. -// -// swagger:model clusterLicenseState -type ClusterLicenseState struct { - LicenseState -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ClusterLicenseState) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 LicenseState - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.LicenseState = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ClusterLicenseState) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.LicenseState) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this cluster license state -func (m *ClusterLicenseState) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with LicenseState - if err := m.LicenseState.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this cluster license state based on the context it is used -func (m *ClusterLicenseState) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with LicenseState - if err := m.LicenseState.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterLicenseState) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterLicenseState) UnmarshalBinary(b []byte) error { - var res ClusterLicenseState - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cluster_networking_endpoint.go b/v1/models/cluster_networking_endpoint.go index 857d1b6b..6da06758 100644 --- a/v1/models/cluster_networking_endpoint.go +++ b/v1/models/cluster_networking_endpoint.go @@ -27,6 +27,9 @@ type ClusterNetworkingEndpoint struct { // The IPv6 address. IPV6Addr *string `json:"ipv6Addr,omitempty"` + + // Specifies if this endpoint is preferred or not. + IsPreferredEndpoint *bool `json:"isPreferredEndpoint,omitempty"` } // Validate validates this cluster networking endpoint diff --git a/v1/models/cluster_stats.go b/v1/models/cluster_stats.go index b5c4e21e..0acf4903 100644 --- a/v1/models/cluster_stats.go +++ b/v1/models/cluster_stats.go @@ -20,8 +20,13 @@ import ( // swagger:model ClusterStats type ClusterStats struct { - // cloud usage perf stats - CloudUsagePerfStats *ClusterStatsCloudUsagePerfStats `json:"cloudUsagePerfStats,omitempty"` + // Cloud Tier Statistics. + // + // Provides usage and performance statistics for the remote data stored on + // a Cloud Tier by the Cohesity Cluster. + CloudUsagePerfStats struct { + UsageAndPerformanceStats + } `json:"cloudUsagePerfStats,omitempty"` // Provides the ratio of Cluster Logical Data (totalLogicalUsageBytes) // Managed to Cluster Storage Used (totalPhysicalUsageBytes) @@ -36,14 +41,32 @@ type ClusterStats struct { // Specifies the id of the Cohesity Cluster. ID *int64 `json:"id,omitempty"` - // local usage perf stats - LocalUsagePerfStats *ClusterStatsLocalUsagePerfStats `json:"localUsagePerfStats,omitempty"` - - // logical stats - LogicalStats *ClusterStatsLogicalStats `json:"logicalStats,omitempty"` + // Local Statistics. + // + // Provides usage and performance statistics for local data stored directly + // on the Cohesity Cluster. + LocalUsagePerfStats struct { + UsageAndPerformanceStats + } `json:"localUsagePerfStats,omitempty"` - // usage perf stats - UsagePerfStats *ClusterStatsUsagePerfStats `json:"usagePerfStats,omitempty"` + // Logical Statistics. + // + // Specifies the total logical data size of all the local and + // Cloud Tier data stored by the Cohesity Cluster before the data is + // reduced by change-block tracking, compression and deduplication. + // The size of the data if the data is fully hydrated or expanded. + LogicalStats struct { + LogicalStats + } `json:"logicalStats,omitempty"` + + // Local and Cloud Tier Statistics. + // + // Provides usage and performance statistics about the local data + // stored directly on the Cohesity Cluster and the remote data + // stored on a Cloud Tier for the Cohesity Cluster. + UsagePerfStats struct { + UsageAndPerformanceStats + } `json:"usagePerfStats,omitempty"` } // Validate validates this cluster stats @@ -81,17 +104,6 @@ func (m *ClusterStats) validateCloudUsagePerfStats(formats strfmt.Registry) erro return nil } - if m.CloudUsagePerfStats != nil { - if err := m.CloudUsagePerfStats.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudUsagePerfStats") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudUsagePerfStats") - } - return err - } - } - return nil } @@ -119,17 +131,6 @@ func (m *ClusterStats) validateLocalUsagePerfStats(formats strfmt.Registry) erro return nil } - if m.LocalUsagePerfStats != nil { - if err := m.LocalUsagePerfStats.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("localUsagePerfStats") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("localUsagePerfStats") - } - return err - } - } - return nil } @@ -138,17 +139,6 @@ func (m *ClusterStats) validateLogicalStats(formats strfmt.Registry) error { return nil } - if m.LogicalStats != nil { - if err := m.LogicalStats.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("logicalStats") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("logicalStats") - } - return err - } - } - return nil } @@ -157,17 +147,6 @@ func (m *ClusterStats) validateUsagePerfStats(formats strfmt.Registry) error { return nil } - if m.UsagePerfStats != nil { - if err := m.UsagePerfStats.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("usagePerfStats") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("usagePerfStats") - } - return err - } - } - return nil } @@ -203,22 +182,6 @@ func (m *ClusterStats) ContextValidate(ctx context.Context, formats strfmt.Regis func (m *ClusterStats) contextValidateCloudUsagePerfStats(ctx context.Context, formats strfmt.Registry) error { - if m.CloudUsagePerfStats != nil { - - if swag.IsZero(m.CloudUsagePerfStats) { // not required - return nil - } - - if err := m.CloudUsagePerfStats.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudUsagePerfStats") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudUsagePerfStats") - } - return err - } - } - return nil } @@ -245,64 +208,16 @@ func (m *ClusterStats) contextValidateDataUsageStats(ctx context.Context, format func (m *ClusterStats) contextValidateLocalUsagePerfStats(ctx context.Context, formats strfmt.Registry) error { - if m.LocalUsagePerfStats != nil { - - if swag.IsZero(m.LocalUsagePerfStats) { // not required - return nil - } - - if err := m.LocalUsagePerfStats.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("localUsagePerfStats") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("localUsagePerfStats") - } - return err - } - } - return nil } func (m *ClusterStats) contextValidateLogicalStats(ctx context.Context, formats strfmt.Registry) error { - if m.LogicalStats != nil { - - if swag.IsZero(m.LogicalStats) { // not required - return nil - } - - if err := m.LogicalStats.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("logicalStats") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("logicalStats") - } - return err - } - } - return nil } func (m *ClusterStats) contextValidateUsagePerfStats(ctx context.Context, formats strfmt.Registry) error { - if m.UsagePerfStats != nil { - - if swag.IsZero(m.UsagePerfStats) { // not required - return nil - } - - if err := m.UsagePerfStats.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("usagePerfStats") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("usagePerfStats") - } - return err - } - } - return nil } diff --git a/v1/models/cluster_stats_cloud_usage_perf_stats.go b/v1/models/cluster_stats_cloud_usage_perf_stats.go deleted file mode 100644 index 4d644af7..00000000 --- a/v1/models/cluster_stats_cloud_usage_perf_stats.go +++ /dev/null @@ -1,96 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ClusterStatsCloudUsagePerfStats Cloud Tier Statistics. -// -// Provides usage and performance statistics for the remote data stored on -// a Cloud Tier by the Cohesity Cluster. -// -// swagger:model clusterStatsCloudUsagePerfStats -type ClusterStatsCloudUsagePerfStats struct { - UsageAndPerformanceStats -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ClusterStatsCloudUsagePerfStats) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 UsageAndPerformanceStats - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.UsageAndPerformanceStats = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ClusterStatsCloudUsagePerfStats) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.UsageAndPerformanceStats) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this cluster stats cloud usage perf stats -func (m *ClusterStatsCloudUsagePerfStats) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UsageAndPerformanceStats - if err := m.UsageAndPerformanceStats.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this cluster stats cloud usage perf stats based on the context it is used -func (m *ClusterStatsCloudUsagePerfStats) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UsageAndPerformanceStats - if err := m.UsageAndPerformanceStats.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterStatsCloudUsagePerfStats) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterStatsCloudUsagePerfStats) UnmarshalBinary(b []byte) error { - var res ClusterStatsCloudUsagePerfStats - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cluster_stats_local_usage_perf_stats.go b/v1/models/cluster_stats_local_usage_perf_stats.go deleted file mode 100644 index 517c067f..00000000 --- a/v1/models/cluster_stats_local_usage_perf_stats.go +++ /dev/null @@ -1,96 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ClusterStatsLocalUsagePerfStats Local Statistics. -// -// Provides usage and performance statistics for local data stored directly -// on the Cohesity Cluster. -// -// swagger:model clusterStatsLocalUsagePerfStats -type ClusterStatsLocalUsagePerfStats struct { - UsageAndPerformanceStats -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ClusterStatsLocalUsagePerfStats) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 UsageAndPerformanceStats - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.UsageAndPerformanceStats = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ClusterStatsLocalUsagePerfStats) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.UsageAndPerformanceStats) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this cluster stats local usage perf stats -func (m *ClusterStatsLocalUsagePerfStats) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UsageAndPerformanceStats - if err := m.UsageAndPerformanceStats.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this cluster stats local usage perf stats based on the context it is used -func (m *ClusterStatsLocalUsagePerfStats) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UsageAndPerformanceStats - if err := m.UsageAndPerformanceStats.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterStatsLocalUsagePerfStats) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterStatsLocalUsagePerfStats) UnmarshalBinary(b []byte) error { - var res ClusterStatsLocalUsagePerfStats - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cluster_stats_logical_stats.go b/v1/models/cluster_stats_logical_stats.go deleted file mode 100644 index b6ce6eae..00000000 --- a/v1/models/cluster_stats_logical_stats.go +++ /dev/null @@ -1,98 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ClusterStatsLogicalStats Logical Statistics. -// -// Specifies the total logical data size of all the local and -// Cloud Tier data stored by the Cohesity Cluster before the data is -// reduced by change-block tracking, compression and deduplication. -// The size of the data if the data is fully hydrated or expanded. -// -// swagger:model clusterStatsLogicalStats -type ClusterStatsLogicalStats struct { - LogicalStats -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ClusterStatsLogicalStats) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 LogicalStats - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.LogicalStats = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ClusterStatsLogicalStats) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.LogicalStats) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this cluster stats logical stats -func (m *ClusterStatsLogicalStats) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with LogicalStats - if err := m.LogicalStats.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this cluster stats logical stats based on the context it is used -func (m *ClusterStatsLogicalStats) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with LogicalStats - if err := m.LogicalStats.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterStatsLogicalStats) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterStatsLogicalStats) UnmarshalBinary(b []byte) error { - var res ClusterStatsLogicalStats - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/cluster_stats_usage_perf_stats.go b/v1/models/cluster_stats_usage_perf_stats.go deleted file mode 100644 index d8600397..00000000 --- a/v1/models/cluster_stats_usage_perf_stats.go +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ClusterStatsUsagePerfStats Local and Cloud Tier Statistics. -// -// Provides usage and performance statistics about the local data -// stored directly on the Cohesity Cluster and the remote data -// stored on a Cloud Tier for the Cohesity Cluster. -// -// swagger:model clusterStatsUsagePerfStats -type ClusterStatsUsagePerfStats struct { - UsageAndPerformanceStats -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ClusterStatsUsagePerfStats) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 UsageAndPerformanceStats - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.UsageAndPerformanceStats = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ClusterStatsUsagePerfStats) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.UsageAndPerformanceStats) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this cluster stats usage perf stats -func (m *ClusterStatsUsagePerfStats) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UsageAndPerformanceStats - if err := m.UsageAndPerformanceStats.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this cluster stats usage perf stats based on the context it is used -func (m *ClusterStatsUsagePerfStats) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UsageAndPerformanceStats - if err := m.UsageAndPerformanceStats.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterStatsUsagePerfStats) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterStatsUsagePerfStats) UnmarshalBinary(b []byte) error { - var res ClusterStatsUsagePerfStats - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/copy_run.go b/v1/models/copy_run.go index 3079feb6..6de4b1f3 100644 --- a/v1/models/copy_run.go +++ b/v1/models/copy_run.go @@ -74,8 +74,10 @@ type CopyRun struct { // Remote Cohesity Cluster. Target *SnapshotTargetSettings `json:"target,omitempty"` - // task Uid - TaskUID *CopyRunTaskUID `json:"taskUid,omitempty"` + // Specifies a globally unique id of the copy task. + TaskUID struct { + UniversalID + } `json:"taskUid,omitempty"` // Specifies a message to the user if any manual intervention is needed to // make forward progress for the archival task. This message is mainly @@ -303,17 +305,6 @@ func (m *CopyRun) validateTaskUID(formats strfmt.Registry) error { return nil } - if m.TaskUID != nil { - if err := m.TaskUID.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("taskUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("taskUid") - } - return err - } - } - return nil } @@ -466,22 +457,6 @@ func (m *CopyRun) contextValidateTarget(ctx context.Context, formats strfmt.Regi func (m *CopyRun) contextValidateTaskUID(ctx context.Context, formats strfmt.Registry) error { - if m.TaskUID != nil { - - if swag.IsZero(m.TaskUID) { // not required - return nil - } - - if err := m.TaskUID.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("taskUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("taskUid") - } - return err - } - } - return nil } diff --git a/v1/models/copy_run_task_uid.go b/v1/models/copy_run_task_uid.go deleted file mode 100644 index 2b07929c..00000000 --- a/v1/models/copy_run_task_uid.go +++ /dev/null @@ -1,93 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CopyRunTaskUID Specifies a globally unique id of the copy task. -// -// swagger:model copyRunTaskUid -type CopyRunTaskUID struct { - UniversalID -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *CopyRunTaskUID) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 UniversalID - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.UniversalID = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m CopyRunTaskUID) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.UniversalID) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this copy run task Uid -func (m *CopyRunTaskUID) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UniversalID - if err := m.UniversalID.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this copy run task Uid based on the context it is used -func (m *CopyRunTaskUID) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UniversalID - if err := m.UniversalID.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *CopyRunTaskUID) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CopyRunTaskUID) UnmarshalBinary(b []byte) error { - var res CopyRunTaskUID - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/create_ip_config_parameters.go b/v1/models/create_ip_config_parameters.go deleted file mode 100644 index 414a9abc..00000000 --- a/v1/models/create_ip_config_parameters.go +++ /dev/null @@ -1,138 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// CreateIPConfigParameters Create IP Config Parameters. -// -// Specifies the parameters needed for an ipconfig request. -// -// swagger:model CreateIpConfigParameters -type CreateIPConfigParameters struct { - - // Specifies the interface ips. - Ips []string `json:"ips"` - - // Specifies the interface mtu. - Mtu *int32 `json:"mtu,omitempty"` - - // Specifies the interface name. - // Required: true - Name *string `json:"name"` - - // Specifies the interface role. - // 'kPrimary' indicates a primary role. - // 'kSecondary' indicates a secondary role. - // Enum: ["kPrimary","kSecondary"] - Role *string `json:"role,omitempty"` - - // Specifies the interface gateway. - SubnetGateway *string `json:"subnetGateway,omitempty"` - - // Specifies the interface subnet mask. - SubnetMask *string `json:"subnetMask,omitempty"` -} - -// Validate validates this create Ip config parameters -func (m *CreateIPConfigParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRole(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CreateIPConfigParameters) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -var createIpConfigParametersTypeRolePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["kPrimary","kSecondary"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - createIpConfigParametersTypeRolePropEnum = append(createIpConfigParametersTypeRolePropEnum, v) - } -} - -const ( - - // CreateIPConfigParametersRoleKPrimary captures enum value "kPrimary" - CreateIPConfigParametersRoleKPrimary string = "kPrimary" - - // CreateIPConfigParametersRoleKSecondary captures enum value "kSecondary" - CreateIPConfigParametersRoleKSecondary string = "kSecondary" -) - -// prop value enum -func (m *CreateIPConfigParameters) validateRoleEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, createIpConfigParametersTypeRolePropEnum, true); err != nil { - return err - } - return nil -} - -func (m *CreateIPConfigParameters) validateRole(formats strfmt.Registry) error { - if swag.IsZero(m.Role) { // not required - return nil - } - - // value enum - if err := m.validateRoleEnum("role", "body", *m.Role); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this create Ip config parameters based on context it is used -func (m *CreateIPConfigParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CreateIPConfigParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreateIPConfigParameters) UnmarshalBinary(b []byte) error { - var res CreateIPConfigParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/create_ip_config_result.go b/v1/models/create_ip_config_result.go deleted file mode 100644 index b792e6d9..00000000 --- a/v1/models/create_ip_config_result.go +++ /dev/null @@ -1,53 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CreateIPConfigResult Create IP Config Result. -// -// Specifies the result of a request to create an ipconfig entry. -// -// swagger:model CreateIpConfigResult -type CreateIPConfigResult struct { - - // Specifies a message describing the result of a request to create an - // ipconfig entry. - Message *string `json:"message,omitempty"` -} - -// Validate validates this create Ip config result -func (m *CreateIPConfigResult) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this create Ip config result based on context it is used -func (m *CreateIPConfigResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CreateIPConfigResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreateIPConfigResult) UnmarshalBinary(b []byte) error { - var res CreateIPConfigResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/create_remote_vault_restore_task_parameters.go b/v1/models/create_remote_vault_restore_task_parameters.go index 3ac40a85..456f0c9e 100644 --- a/v1/models/create_remote_vault_restore_task_parameters.go +++ b/v1/models/create_remote_vault_restore_task_parameters.go @@ -51,9 +51,13 @@ type CreateRemoteVaultRestoreTaskParameters struct { // originally archived from multiple remote Clusters. RestoreObjects []*IndexAndSnapshots `json:"restoreObjects"` - // search job Uid + // Search Job Uid. + // + // Specifies the unique id of the remote Vault search Job. // Required: true - SearchJobUID *CreateRemoteVaultRestoreTaskParametersSearchJobUID `json:"searchJobUid"` + SearchJobUID struct { + UniversalID + } `json:"searchJobUid"` // Specifies a name of the restore task. // Required: true @@ -170,21 +174,6 @@ func (m *CreateRemoteVaultRestoreTaskParameters) validateRestoreObjects(formats func (m *CreateRemoteVaultRestoreTaskParameters) validateSearchJobUID(formats strfmt.Registry) error { - if err := validate.Required("searchJobUid", "body", m.SearchJobUID); err != nil { - return err - } - - if m.SearchJobUID != nil { - if err := m.SearchJobUID.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("searchJobUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("searchJobUid") - } - return err - } - } - return nil } @@ -251,18 +240,6 @@ func (m *CreateRemoteVaultRestoreTaskParameters) contextValidateRestoreObjects(c func (m *CreateRemoteVaultRestoreTaskParameters) contextValidateSearchJobUID(ctx context.Context, formats strfmt.Registry) error { - if m.SearchJobUID != nil { - - if err := m.SearchJobUID.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("searchJobUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("searchJobUid") - } - return err - } - } - return nil } diff --git a/v1/models/create_remote_vault_restore_task_parameters_search_job_uid.go b/v1/models/create_remote_vault_restore_task_parameters_search_job_uid.go deleted file mode 100644 index 1883889c..00000000 --- a/v1/models/create_remote_vault_restore_task_parameters_search_job_uid.go +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CreateRemoteVaultRestoreTaskParametersSearchJobUID Search Job Uid. -// -// Specifies the unique id of the remote Vault search Job. -// -// swagger:model createRemoteVaultRestoreTaskParametersSearchJobUid -type CreateRemoteVaultRestoreTaskParametersSearchJobUID struct { - UniversalID -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *CreateRemoteVaultRestoreTaskParametersSearchJobUID) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 UniversalID - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.UniversalID = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m CreateRemoteVaultRestoreTaskParametersSearchJobUID) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.UniversalID) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this create remote vault restore task parameters search job Uid -func (m *CreateRemoteVaultRestoreTaskParametersSearchJobUID) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UniversalID - if err := m.UniversalID.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this create remote vault restore task parameters search job Uid based on the context it is used -func (m *CreateRemoteVaultRestoreTaskParametersSearchJobUID) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UniversalID - if err := m.UniversalID.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *CreateRemoteVaultRestoreTaskParametersSearchJobUID) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreateRemoteVaultRestoreTaskParametersSearchJobUID) UnmarshalBinary(b []byte) error { - var res CreateRemoteVaultRestoreTaskParametersSearchJobUID - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/create_view_box_params.go b/v1/models/create_view_box_params.go index beda0e15..0674250f 100644 --- a/v1/models/create_view_box_params.go +++ b/v1/models/create_view_box_params.go @@ -49,11 +49,27 @@ type CreateViewBoxParams struct { // Required: true ClusterPartitionID *int64 `json:"clusterPartitionId"` - // default user quota policy - DefaultUserQuotaPolicy *CreateViewBoxParamsDefaultUserQuotaPolicy `json:"defaultUserQuotaPolicy,omitempty"` - - // default view quota policy - DefaultViewQuotaPolicy *CreateViewBoxParamsDefaultViewQuotaPolicy `json:"defaultViewQuotaPolicy,omitempty"` + // Specifies an optional quota policy/limits that are inherited by all users + // within the views in this viewbox. + DefaultUserQuotaPolicy struct { + QuotaPolicy + } `json:"defaultUserQuotaPolicy,omitempty"` + + // Specifies an optional default logical quota limit (in bytes) + // for the Views in this Storage Domain (View Box). + // (Logical data is when the data is fully hydrated and expanded.) + // However, this inherited quota can be overwritten at the View level. + // A new write is not allowed if the Storage Domain (View Box) will exceed + // the specified quota. + // However, it takes time for the Cohesity Cluster to calculate + // the usage across Nodes, so the limit may be exceeded by a small amount. + // In addition, if the limit is increased or data is removed, + // there may be delay before the Cohesity Cluster allows more data + // to be written to the Storage Domain (View Box), as the Cluster is + // calculating the usage across Nodes. + DefaultViewQuotaPolicy struct { + QuotaPolicy + } `json:"defaultViewQuotaPolicy,omitempty"` // Specifies whether DEK(Data Encryption Key) rotation is enabled for this // viewbox. This is applicable only when the viewbox uses AWS or similar KMS @@ -92,8 +108,24 @@ type CreateViewBoxParams struct { // Specifies the NIS domain that this view box is mapped to. NisDomainNameVec []string `json:"nisDomainNameVec"` - // physical quota - PhysicalQuota *CreateViewBoxParamsPhysicalQuota `json:"physicalQuota,omitempty"` + // Specifies an optional quota limit (in bytes) for the physical + // usage of this Storage Domain (View Box). + // This quota limit defines a physical limit for size of the data that + // can be physically stored on the Storage Domain (View Box), after the data + // has been reduced by change block tracking, compression and deduplication. + // The physical usage is the aggregate sum of the data stored for this + // Storage Domain (View Box) on all disks in the Cluster. + // (The usage includes Cloud Tier data and user data.) + // A new write is not allowed if the Storage Domain (View Box) will exceed + // the specified quota. However, it takes time for the Cohesity Cluster to + // calculate the usage across Nodes, so the limit may be exceeded by a small + // amount. In addition, if the limit is increased or data is removed, + // there may be a delay before the Cohesity Cluster allows more data + // to be written to the Storage Domain (View Box), as the Cluster is + // calculating the usage across Nodes. + PhysicalQuota struct { + QuotaPolicy + } `json:"physicalQuota,omitempty"` // Specifies whether creation of a S3 bucket is allowed in this // Storage Domain (View Box). @@ -196,17 +228,6 @@ func (m *CreateViewBoxParams) validateDefaultUserQuotaPolicy(formats strfmt.Regi return nil } - if m.DefaultUserQuotaPolicy != nil { - if err := m.DefaultUserQuotaPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("defaultUserQuotaPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("defaultUserQuotaPolicy") - } - return err - } - } - return nil } @@ -215,17 +236,6 @@ func (m *CreateViewBoxParams) validateDefaultViewQuotaPolicy(formats strfmt.Regi return nil } - if m.DefaultViewQuotaPolicy != nil { - if err := m.DefaultViewQuotaPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("defaultViewQuotaPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("defaultViewQuotaPolicy") - } - return err - } - } - return nil } @@ -243,17 +253,6 @@ func (m *CreateViewBoxParams) validatePhysicalQuota(formats strfmt.Registry) err return nil } - if m.PhysicalQuota != nil { - if err := m.PhysicalQuota.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("physicalQuota") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("physicalQuota") - } - return err - } - } - return nil } @@ -333,64 +332,16 @@ func (m *CreateViewBoxParams) contextValidateClientSubnetWhiteList(ctx context.C func (m *CreateViewBoxParams) contextValidateDefaultUserQuotaPolicy(ctx context.Context, formats strfmt.Registry) error { - if m.DefaultUserQuotaPolicy != nil { - - if swag.IsZero(m.DefaultUserQuotaPolicy) { // not required - return nil - } - - if err := m.DefaultUserQuotaPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("defaultUserQuotaPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("defaultUserQuotaPolicy") - } - return err - } - } - return nil } func (m *CreateViewBoxParams) contextValidateDefaultViewQuotaPolicy(ctx context.Context, formats strfmt.Registry) error { - if m.DefaultViewQuotaPolicy != nil { - - if swag.IsZero(m.DefaultViewQuotaPolicy) { // not required - return nil - } - - if err := m.DefaultViewQuotaPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("defaultViewQuotaPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("defaultViewQuotaPolicy") - } - return err - } - } - return nil } func (m *CreateViewBoxParams) contextValidatePhysicalQuota(ctx context.Context, formats strfmt.Registry) error { - if m.PhysicalQuota != nil { - - if swag.IsZero(m.PhysicalQuota) { // not required - return nil - } - - if err := m.PhysicalQuota.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("physicalQuota") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("physicalQuota") - } - return err - } - } - return nil } diff --git a/v1/models/create_view_box_params_default_user_quota_policy.go b/v1/models/create_view_box_params_default_user_quota_policy.go deleted file mode 100644 index feeab724..00000000 --- a/v1/models/create_view_box_params_default_user_quota_policy.go +++ /dev/null @@ -1,94 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CreateViewBoxParamsDefaultUserQuotaPolicy Specifies an optional quota policy/limits that are inherited by all users -// within the views in this viewbox. -// -// swagger:model createViewBoxParamsDefaultUserQuotaPolicy -type CreateViewBoxParamsDefaultUserQuotaPolicy struct { - QuotaPolicy -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *CreateViewBoxParamsDefaultUserQuotaPolicy) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 QuotaPolicy - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.QuotaPolicy = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m CreateViewBoxParamsDefaultUserQuotaPolicy) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.QuotaPolicy) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this create view box params default user quota policy -func (m *CreateViewBoxParamsDefaultUserQuotaPolicy) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with QuotaPolicy - if err := m.QuotaPolicy.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this create view box params default user quota policy based on the context it is used -func (m *CreateViewBoxParamsDefaultUserQuotaPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with QuotaPolicy - if err := m.QuotaPolicy.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *CreateViewBoxParamsDefaultUserQuotaPolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreateViewBoxParamsDefaultUserQuotaPolicy) UnmarshalBinary(b []byte) error { - var res CreateViewBoxParamsDefaultUserQuotaPolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/create_view_box_params_default_view_quota_policy.go b/v1/models/create_view_box_params_default_view_quota_policy.go deleted file mode 100644 index 2b54e933..00000000 --- a/v1/models/create_view_box_params_default_view_quota_policy.go +++ /dev/null @@ -1,104 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CreateViewBoxParamsDefaultViewQuotaPolicy Specifies an optional default logical quota limit (in bytes) -// for the Views in this Storage Domain (View Box). -// (Logical data is when the data is fully hydrated and expanded.) -// However, this inherited quota can be overwritten at the View level. -// A new write is not allowed if the Storage Domain (View Box) will exceed -// the specified quota. -// However, it takes time for the Cohesity Cluster to calculate -// the usage across Nodes, so the limit may be exceeded by a small amount. -// In addition, if the limit is increased or data is removed, -// there may be delay before the Cohesity Cluster allows more data -// to be written to the Storage Domain (View Box), as the Cluster is -// calculating the usage across Nodes. -// -// swagger:model createViewBoxParamsDefaultViewQuotaPolicy -type CreateViewBoxParamsDefaultViewQuotaPolicy struct { - QuotaPolicy -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *CreateViewBoxParamsDefaultViewQuotaPolicy) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 QuotaPolicy - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.QuotaPolicy = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m CreateViewBoxParamsDefaultViewQuotaPolicy) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.QuotaPolicy) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this create view box params default view quota policy -func (m *CreateViewBoxParamsDefaultViewQuotaPolicy) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with QuotaPolicy - if err := m.QuotaPolicy.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this create view box params default view quota policy based on the context it is used -func (m *CreateViewBoxParamsDefaultViewQuotaPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with QuotaPolicy - if err := m.QuotaPolicy.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *CreateViewBoxParamsDefaultViewQuotaPolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreateViewBoxParamsDefaultViewQuotaPolicy) UnmarshalBinary(b []byte) error { - var res CreateViewBoxParamsDefaultViewQuotaPolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/create_view_box_params_physical_quota.go b/v1/models/create_view_box_params_physical_quota.go deleted file mode 100644 index 9a253f2f..00000000 --- a/v1/models/create_view_box_params_physical_quota.go +++ /dev/null @@ -1,107 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CreateViewBoxParamsPhysicalQuota Specifies an optional quota limit (in bytes) for the physical -// usage of this Storage Domain (View Box). -// This quota limit defines a physical limit for size of the data that -// can be physically stored on the Storage Domain (View Box), after the data -// has been reduced by change block tracking, compression and deduplication. -// The physical usage is the aggregate sum of the data stored for this -// Storage Domain (View Box) on all disks in the Cluster. -// (The usage includes Cloud Tier data and user data.) -// A new write is not allowed if the Storage Domain (View Box) will exceed -// the specified quota. However, it takes time for the Cohesity Cluster to -// calculate the usage across Nodes, so the limit may be exceeded by a small -// amount. In addition, if the limit is increased or data is removed, -// there may be a delay before the Cohesity Cluster allows more data -// to be written to the Storage Domain (View Box), as the Cluster is -// calculating the usage across Nodes. -// -// swagger:model createViewBoxParamsPhysicalQuota -type CreateViewBoxParamsPhysicalQuota struct { - QuotaPolicy -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *CreateViewBoxParamsPhysicalQuota) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 QuotaPolicy - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.QuotaPolicy = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m CreateViewBoxParamsPhysicalQuota) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.QuotaPolicy) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this create view box params physical quota -func (m *CreateViewBoxParamsPhysicalQuota) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with QuotaPolicy - if err := m.QuotaPolicy.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this create view box params physical quota based on the context it is used -func (m *CreateViewBoxParamsPhysicalQuota) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with QuotaPolicy - if err := m.QuotaPolicy.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *CreateViewBoxParamsPhysicalQuota) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreateViewBoxParamsPhysicalQuota) UnmarshalBinary(b []byte) error { - var res CreateViewBoxParamsPhysicalQuota - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/create_view_request.go b/v1/models/create_view_request.go index aa709c5a..a2f7b3c4 100644 --- a/v1/models/create_view_request.go +++ b/v1/models/create_view_request.go @@ -103,8 +103,24 @@ type CreateViewRequest struct { // write to this view if this is set to true. IsReadOnly *bool `json:"isReadOnly,omitempty"` - // logical quota - LogicalQuota *CreateViewRequestLogicalQuota `json:"logicalQuota,omitempty"` + // Specifies an optional logical quota limit (in bytes) for the usage allowed + // on this View. + // (Logical data is when the data is fully hydrated and expanded.) + // This limit overrides the limit inherited from the Storage Domain + // (View Box) (if set). + // If logicalQuota is nil, the limit is inherited from the + // Storage Domain (View Box) (if set). + // A new write is not allowed if the Storage Domain (View Box) will exceed the + // specified quota. + // However, it takes time for the Cohesity Cluster to calculate + // the usage across Nodes, so the limit may be exceeded by a small amount. + // In addition, if the limit is increased or data is removed, + // there may be a delay before the Cohesity Cluster allows more data + // to be written to the View, as the Cluster is calculating the usage + // across Nodes. + LogicalQuota struct { + QuotaPolicy + } `json:"logicalQuota,omitempty"` // Specifies the name of the new View to create. // Required: true @@ -134,7 +150,7 @@ type CreateViewRequest struct { // global setting. OverrideGlobalWhitelist *bool `json:"overrideGlobalWhitelist,omitempty"` - // Specifies the supported Protocols for the View. + // Deprecated: Specifies the supported Protocols for the View. // 'kAll' enables protocol access to following three views: NFS, SMB and S3. // 'kNFSOnly' enables protocol access to NFS only. // 'kSMBOnly' enables protocol access to SMB only. @@ -213,6 +229,9 @@ type CreateViewRequest struct { // Specifies the pinning config of this view. ViewPinningConfig *ViewPinningConfig `json:"viewPinningConfig,omitempty"` + + // Specifies the supported Protocols for the View. + ViewProtocol []*ViewProtocol `json:"viewProtocol"` } // Validate validates this create view request @@ -295,6 +314,10 @@ func (m *CreateViewRequest) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateViewProtocol(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -363,17 +386,6 @@ func (m *CreateViewRequest) validateLogicalQuota(formats strfmt.Registry) error return nil } - if m.LogicalQuota != nil { - if err := m.LogicalQuota.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("logicalQuota") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("logicalQuota") - } - return err - } - } - return nil } @@ -756,6 +768,32 @@ func (m *CreateViewRequest) validateViewPinningConfig(formats strfmt.Registry) e return nil } +func (m *CreateViewRequest) validateViewProtocol(formats strfmt.Registry) error { + if swag.IsZero(m.ViewProtocol) { // not required + return nil + } + + for i := 0; i < len(m.ViewProtocol); i++ { + if swag.IsZero(m.ViewProtocol[i]) { // not required + continue + } + + if m.ViewProtocol[i] != nil { + if err := m.ViewProtocol[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("viewProtocol" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("viewProtocol" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + // ContextValidate validate this create view request based on the context it is used func (m *CreateViewRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error @@ -816,6 +854,10 @@ func (m *CreateViewRequest) ContextValidate(ctx context.Context, formats strfmt. res = append(res, err) } + if err := m.contextValidateViewProtocol(ctx, formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -887,22 +929,6 @@ func (m *CreateViewRequest) contextValidateFileLockConfig(ctx context.Context, f func (m *CreateViewRequest) contextValidateLogicalQuota(ctx context.Context, formats strfmt.Registry) error { - if m.LogicalQuota != nil { - - if swag.IsZero(m.LogicalQuota) { // not required - return nil - } - - if err := m.LogicalQuota.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("logicalQuota") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("logicalQuota") - } - return err - } - } - return nil } @@ -1128,6 +1154,31 @@ func (m *CreateViewRequest) contextValidateViewPinningConfig(ctx context.Context return nil } +func (m *CreateViewRequest) contextValidateViewProtocol(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.ViewProtocol); i++ { + + if m.ViewProtocol[i] != nil { + + if swag.IsZero(m.ViewProtocol[i]) { // not required + return nil + } + + if err := m.ViewProtocol[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("viewProtocol" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("viewProtocol" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + // MarshalBinary interface implementation func (m *CreateViewRequest) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/v1/models/create_view_request_logical_quota.go b/v1/models/create_view_request_logical_quota.go deleted file mode 100644 index c96ae728..00000000 --- a/v1/models/create_view_request_logical_quota.go +++ /dev/null @@ -1,107 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CreateViewRequestLogicalQuota Specifies an optional logical quota limit (in bytes) for the usage allowed -// on this View. -// (Logical data is when the data is fully hydrated and expanded.) -// This limit overrides the limit inherited from the Storage Domain -// (View Box) (if set). -// If logicalQuota is nil, the limit is inherited from the -// Storage Domain (View Box) (if set). -// A new write is not allowed if the Storage Domain (View Box) will exceed the -// specified quota. -// However, it takes time for the Cohesity Cluster to calculate -// the usage across Nodes, so the limit may be exceeded by a small amount. -// In addition, if the limit is increased or data is removed, -// there may be a delay before the Cohesity Cluster allows more data -// to be written to the View, as the Cluster is calculating the usage -// across Nodes. -// -// swagger:model createViewRequestLogicalQuota -type CreateViewRequestLogicalQuota struct { - QuotaPolicy -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *CreateViewRequestLogicalQuota) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 QuotaPolicy - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.QuotaPolicy = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m CreateViewRequestLogicalQuota) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.QuotaPolicy) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this create view request logical quota -func (m *CreateViewRequestLogicalQuota) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with QuotaPolicy - if err := m.QuotaPolicy.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this create view request logical quota based on the context it is used -func (m *CreateViewRequestLogicalQuota) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with QuotaPolicy - if err := m.QuotaPolicy.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *CreateViewRequestLogicalQuota) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreateViewRequestLogicalQuota) UnmarshalBinary(b []byte) error { - var res CreateViewRequestLogicalQuota - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/created_remote_vault_search_job_uid.go b/v1/models/created_remote_vault_search_job_uid.go index 23d898df..0aecf363 100644 --- a/v1/models/created_remote_vault_search_job_uid.go +++ b/v1/models/created_remote_vault_search_job_uid.go @@ -21,8 +21,10 @@ import ( // swagger:model CreatedRemoteVaultSearchJobUid type CreatedRemoteVaultSearchJobUID struct { - // search job Uid - SearchJobUID *CreatedRemoteVaultSearchJobUIDSearchJobUID `json:"searchJobUid,omitempty"` + // Specifies the unique id assigned for the search Job on the Cluster. + SearchJobUID struct { + UniversalID + } `json:"searchJobUid,omitempty"` } // Validate validates this created remote vault search job Uid @@ -44,17 +46,6 @@ func (m *CreatedRemoteVaultSearchJobUID) validateSearchJobUID(formats strfmt.Reg return nil } - if m.SearchJobUID != nil { - if err := m.SearchJobUID.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("searchJobUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("searchJobUid") - } - return err - } - } - return nil } @@ -74,22 +65,6 @@ func (m *CreatedRemoteVaultSearchJobUID) ContextValidate(ctx context.Context, fo func (m *CreatedRemoteVaultSearchJobUID) contextValidateSearchJobUID(ctx context.Context, formats strfmt.Registry) error { - if m.SearchJobUID != nil { - - if swag.IsZero(m.SearchJobUID) { // not required - return nil - } - - if err := m.SearchJobUID.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("searchJobUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("searchJobUid") - } - return err - } - } - return nil } diff --git a/v1/models/created_remote_vault_search_job_uid_search_job_uid.go b/v1/models/created_remote_vault_search_job_uid_search_job_uid.go deleted file mode 100644 index d6ef2286..00000000 --- a/v1/models/created_remote_vault_search_job_uid_search_job_uid.go +++ /dev/null @@ -1,93 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CreatedRemoteVaultSearchJobUIDSearchJobUID Specifies the unique id assigned for the search Job on the Cluster. -// -// swagger:model createdRemoteVaultSearchJobUidSearchJobUid -type CreatedRemoteVaultSearchJobUIDSearchJobUID struct { - UniversalID -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *CreatedRemoteVaultSearchJobUIDSearchJobUID) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 UniversalID - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.UniversalID = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m CreatedRemoteVaultSearchJobUIDSearchJobUID) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.UniversalID) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this created remote vault search job Uid search job Uid -func (m *CreatedRemoteVaultSearchJobUIDSearchJobUID) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UniversalID - if err := m.UniversalID.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this created remote vault search job Uid search job Uid based on the context it is used -func (m *CreatedRemoteVaultSearchJobUIDSearchJobUID) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UniversalID - if err := m.UniversalID.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *CreatedRemoteVaultSearchJobUIDSearchJobUID) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CreatedRemoteVaultSearchJobUIDSearchJobUID) UnmarshalBinary(b []byte) error { - var res CreatedRemoteVaultSearchJobUIDSearchJobUID - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/delete_ip_config_parameters.go b/v1/models/delete_ip_config_parameters.go deleted file mode 100644 index 76a407bb..00000000 --- a/v1/models/delete_ip_config_parameters.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// DeleteIPConfigParameters Delete IP Config Parameters. -// -// Specifies the parameters needed for an ipunconfig request. -// -// swagger:model DeleteIpConfigParameters -type DeleteIPConfigParameters struct { - - // Specifies the interface name to be deleted. - // Required: true - Name *string `json:"name"` -} - -// Validate validates this delete Ip config parameters -func (m *DeleteIPConfigParameters) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateName(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DeleteIPConfigParameters) validateName(formats strfmt.Registry) error { - - if err := validate.Required("name", "body", m.Name); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this delete Ip config parameters based on context it is used -func (m *DeleteIPConfigParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DeleteIPConfigParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DeleteIPConfigParameters) UnmarshalBinary(b []byte) error { - var res DeleteIPConfigParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/entity_identifiers.go b/v1/models/entity_identifiers.go new file mode 100644 index 00000000..46ed5feb --- /dev/null +++ b/v1/models/entity_identifiers.go @@ -0,0 +1,65 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// EntityIdentifiers Specifies the identifiers for an entity +// +// swagger:model EntityIdentifiers +type EntityIdentifiers struct { + + // Specifies the link to documentation or additional information about the + // entity. This URL can be used to access more detailed information, + // guidelines, or metadata related to the entity id. It helps in + // understanding the context or usage of the entity id." + DocumentationLink *string `json:"documentationLink,omitempty"` + + // Specifies the type of identifier. For example, a Virtual Machine (VM) can + // be identified through various types of IDs, such as UUID, Managed Object + // Reference (moref), or other unique identifiers. + Key *string `json:"key,omitempty"` + + // Specifies the value of the identifier corresponding to the type specified + // in the key. + Value *string `json:"value,omitempty"` + + // Specifies the version number associated with this EntityIdentifier + Version *int64 `json:"version,omitempty"` +} + +// Validate validates this entity identifiers +func (m *EntityIdentifiers) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this entity identifiers based on context it is used +func (m *EntityIdentifiers) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *EntityIdentifiers) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *EntityIdentifiers) UnmarshalBinary(b []byte) error { + var res EntityIdentifiers + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/v1/models/entity_size_info.go b/v1/models/entity_size_info.go index efb2fed6..8e4c2970 100644 --- a/v1/models/entity_size_info.go +++ b/v1/models/entity_size_info.go @@ -23,7 +23,7 @@ type EntitySizeInfo struct { // and certain sources (agent based, NAS, VMs with guest tools). Other // adapters can leave this blank. // - // In windows, a 100GB volume can have a space usage of 30GB. In + // Example: In windows, a 100GB volume can have a space usage of 30GB. In // that case, this value is set to 30GB. // // This suffers from the following two uncertainties: diff --git a/v1/models/file_search_result.go b/v1/models/file_search_result.go index 3cdc7c33..27cd69d6 100644 --- a/v1/models/file_search_result.go +++ b/v1/models/file_search_result.go @@ -57,8 +57,11 @@ type FileSearchResult struct { // contains the id of the new Inactive Job. JobID *int64 `json:"jobId,omitempty"` - // job Uid - JobUID *FileSearchResultJobUID `json:"jobUid,omitempty"` + // Specifies the universal id of the Protection Job that backed up + // the object that contains the file or folder. + JobUID struct { + UniversalID + } `json:"jobUid,omitempty"` // Specifies the metadata about the OneDrive documents. OneDriveDocumentMetadata *OneDriveDocumentMetadata `json:"oneDriveDocumentMetadata,omitempty"` @@ -206,17 +209,6 @@ func (m *FileSearchResult) validateJobUID(formats strfmt.Registry) error { return nil } - if m.JobUID != nil { - if err := m.JobUID.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("jobUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("jobUid") - } - return err - } - } - return nil } @@ -432,22 +424,6 @@ func (m *FileSearchResult) contextValidateFileVersions(ctx context.Context, form func (m *FileSearchResult) contextValidateJobUID(ctx context.Context, formats strfmt.Registry) error { - if m.JobUID != nil { - - if swag.IsZero(m.JobUID) { // not required - return nil - } - - if err := m.JobUID.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("jobUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("jobUid") - } - return err - } - } - return nil } diff --git a/v1/models/file_search_result_job_uid.go b/v1/models/file_search_result_job_uid.go deleted file mode 100644 index 859f9904..00000000 --- a/v1/models/file_search_result_job_uid.go +++ /dev/null @@ -1,94 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// FileSearchResultJobUID Specifies the universal id of the Protection Job that backed up -// the object that contains the file or folder. -// -// swagger:model fileSearchResultJobUid -type FileSearchResultJobUID struct { - UniversalID -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *FileSearchResultJobUID) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 UniversalID - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.UniversalID = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m FileSearchResultJobUID) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.UniversalID) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this file search result job Uid -func (m *FileSearchResultJobUID) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UniversalID - if err := m.UniversalID.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this file search result job Uid based on the context it is used -func (m *FileSearchResultJobUID) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UniversalID - if err := m.UniversalID.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *FileSearchResultJobUID) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FileSearchResultJobUID) UnmarshalBinary(b []byte) error { - var res FileSearchResultJobUID - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/filesystem_volume.go b/v1/models/filesystem_volume.go index 974a04d3..6c978bc4 100644 --- a/v1/models/filesystem_volume.go +++ b/v1/models/filesystem_volume.go @@ -41,8 +41,13 @@ type FilesystemVolume struct { // If true, this is a supported filesystem volume type. IsSupported *bool `json:"isSupported,omitempty"` - // logical volume - LogicalVolume *FilesystemVolumeLogicalVolume `json:"logicalVolume,omitempty"` + // Logical Volume. + // + // Specify attributes for a kLMV (Linux) or kLDM (Windows) filesystem. + // This field is set only for kLVM and kLDM volume types. + LogicalVolume struct { + LogicalVolume + } `json:"logicalVolume,omitempty"` // Specifies the type of logical volume such as kSimpleVolume, kLVM or kLDM. // 'kSimpleVolume' indicates a simple volume. Data can be used by just @@ -116,17 +121,6 @@ func (m *FilesystemVolume) validateLogicalVolume(formats strfmt.Registry) error return nil } - if m.LogicalVolume != nil { - if err := m.LogicalVolume.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("logicalVolume") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("logicalVolume") - } - return err - } - } - return nil } @@ -220,22 +214,6 @@ func (m *FilesystemVolume) contextValidateDisks(ctx context.Context, formats str func (m *FilesystemVolume) contextValidateLogicalVolume(ctx context.Context, formats strfmt.Registry) error { - if m.LogicalVolume != nil { - - if swag.IsZero(m.LogicalVolume) { // not required - return nil - } - - if err := m.LogicalVolume.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("logicalVolume") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("logicalVolume") - } - return err - } - } - return nil } diff --git a/v1/models/filesystem_volume_logical_volume.go b/v1/models/filesystem_volume_logical_volume.go deleted file mode 100644 index 41208998..00000000 --- a/v1/models/filesystem_volume_logical_volume.go +++ /dev/null @@ -1,96 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// FilesystemVolumeLogicalVolume Logical Volume. -// -// Specify attributes for a kLMV (Linux) or kLDM (Windows) filesystem. -// This field is set only for kLVM and kLDM volume types. -// -// swagger:model filesystemVolumeLogicalVolume -type FilesystemVolumeLogicalVolume struct { - LogicalVolume -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *FilesystemVolumeLogicalVolume) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 LogicalVolume - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.LogicalVolume = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m FilesystemVolumeLogicalVolume) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.LogicalVolume) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this filesystem volume logical volume -func (m *FilesystemVolumeLogicalVolume) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with LogicalVolume - if err := m.LogicalVolume.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this filesystem volume logical volume based on the context it is used -func (m *FilesystemVolumeLogicalVolume) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with LogicalVolume - if err := m.LogicalVolume.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *FilesystemVolumeLogicalVolume) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *FilesystemVolumeLogicalVolume) UnmarshalBinary(b []byte) error { - var res FilesystemVolumeLogicalVolume - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/get_registration_info_response.go b/v1/models/get_registration_info_response.go index 3a87a1ef..b623b2db 100644 --- a/v1/models/get_registration_info_response.go +++ b/v1/models/get_registration_info_response.go @@ -29,8 +29,11 @@ type GetRegistrationInfoResponse struct { // overrideDescription: true RootNodes []*ProtectionSourceTreeInfo `json:"rootNodes"` - // stats - Stats *GetRegistrationInfoResponseStats `json:"stats,omitempty"` + // Specifies the sum of all the stats of protection of Protection Sources + // and views selected by the query parameters. + Stats struct { + ProtectionSummary + } `json:"stats,omitempty"` // Specifies the breakdown of the stats by environment // overrideDescription: true @@ -90,17 +93,6 @@ func (m *GetRegistrationInfoResponse) validateStats(formats strfmt.Registry) err return nil } - if m.Stats != nil { - if err := m.Stats.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("stats") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("stats") - } - return err - } - } - return nil } @@ -179,22 +171,6 @@ func (m *GetRegistrationInfoResponse) contextValidateRootNodes(ctx context.Conte func (m *GetRegistrationInfoResponse) contextValidateStats(ctx context.Context, formats strfmt.Registry) error { - if m.Stats != nil { - - if swag.IsZero(m.Stats) { // not required - return nil - } - - if err := m.Stats.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("stats") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("stats") - } - return err - } - } - return nil } diff --git a/v1/models/get_registration_info_response_stats.go b/v1/models/get_registration_info_response_stats.go deleted file mode 100644 index c6dd45c9..00000000 --- a/v1/models/get_registration_info_response_stats.go +++ /dev/null @@ -1,94 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// GetRegistrationInfoResponseStats Specifies the sum of all the stats of protection of Protection Sources -// and views selected by the query parameters. -// -// swagger:model getRegistrationInfoResponseStats -type GetRegistrationInfoResponseStats struct { - ProtectionSummary -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *GetRegistrationInfoResponseStats) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 ProtectionSummary - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.ProtectionSummary = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m GetRegistrationInfoResponseStats) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.ProtectionSummary) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this get registration info response stats -func (m *GetRegistrationInfoResponseStats) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ProtectionSummary - if err := m.ProtectionSummary.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this get registration info response stats based on the context it is used -func (m *GetRegistrationInfoResponseStats) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ProtectionSummary - if err := m.ProtectionSummary.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *GetRegistrationInfoResponseStats) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GetRegistrationInfoResponseStats) UnmarshalBinary(b []byte) error { - var res GetRegistrationInfoResponseStats - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/index_and_snapshots.go b/v1/models/index_and_snapshots.go index db6b6d19..d8048858 100644 --- a/v1/models/index_and_snapshots.go +++ b/v1/models/index_and_snapshots.go @@ -21,16 +21,26 @@ import ( // swagger:model IndexAndSnapshots type IndexAndSnapshots struct { - // archive task Uid - ArchiveTaskUID *IndexAndSnapshotsArchiveTaskUID `json:"archiveTaskUid,omitempty"` + // Archive Task Uid. + // + // Specifies a unique id of the Archive task that originally archived the + // object to the Vault. + ArchiveTaskUID struct { + UniversalID + } `json:"archiveTaskUid,omitempty"` // Specifies the end time as a Unix epoch Timestamp (in microseconds). // If set, only index and Snapshots for Protection Job Runs that // started before the specified end time are restored. EndTimeUsecs *int64 `json:"endTimeUsecs,omitempty"` - // remote protection job Uid - RemoteProtectionJobUID *IndexAndSnapshotsRemoteProtectionJobUID `json:"remoteProtectionJobUid,omitempty"` + // Protection Job Uid. + // + // Specifies a unique id assigned to the original Protection Job + // by the original Cluster that archived data to the remote Vault. + RemoteProtectionJobUID struct { + UniversalID + } `json:"remoteProtectionJobUid,omitempty"` // Specifies the start time as a Unix epoch Timestamp (in microseconds). // If set, only the index and Snapshots for Protection Job Runs that @@ -65,17 +75,6 @@ func (m *IndexAndSnapshots) validateArchiveTaskUID(formats strfmt.Registry) erro return nil } - if m.ArchiveTaskUID != nil { - if err := m.ArchiveTaskUID.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("archiveTaskUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("archiveTaskUid") - } - return err - } - } - return nil } @@ -84,17 +83,6 @@ func (m *IndexAndSnapshots) validateRemoteProtectionJobUID(formats strfmt.Regist return nil } - if m.RemoteProtectionJobUID != nil { - if err := m.RemoteProtectionJobUID.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("remoteProtectionJobUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("remoteProtectionJobUid") - } - return err - } - } - return nil } @@ -118,43 +106,11 @@ func (m *IndexAndSnapshots) ContextValidate(ctx context.Context, formats strfmt. func (m *IndexAndSnapshots) contextValidateArchiveTaskUID(ctx context.Context, formats strfmt.Registry) error { - if m.ArchiveTaskUID != nil { - - if swag.IsZero(m.ArchiveTaskUID) { // not required - return nil - } - - if err := m.ArchiveTaskUID.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("archiveTaskUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("archiveTaskUid") - } - return err - } - } - return nil } func (m *IndexAndSnapshots) contextValidateRemoteProtectionJobUID(ctx context.Context, formats strfmt.Registry) error { - if m.RemoteProtectionJobUID != nil { - - if swag.IsZero(m.RemoteProtectionJobUID) { // not required - return nil - } - - if err := m.RemoteProtectionJobUID.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("remoteProtectionJobUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("remoteProtectionJobUid") - } - return err - } - } - return nil } diff --git a/v1/models/index_and_snapshots_archive_task_uid.go b/v1/models/index_and_snapshots_archive_task_uid.go deleted file mode 100644 index b88e10e4..00000000 --- a/v1/models/index_and_snapshots_archive_task_uid.go +++ /dev/null @@ -1,96 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// IndexAndSnapshotsArchiveTaskUID Archive Task Uid. -// -// Specifies a unique id of the Archive task that originally archived the -// object to the Vault. -// -// swagger:model indexAndSnapshotsArchiveTaskUid -type IndexAndSnapshotsArchiveTaskUID struct { - UniversalID -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *IndexAndSnapshotsArchiveTaskUID) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 UniversalID - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.UniversalID = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m IndexAndSnapshotsArchiveTaskUID) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.UniversalID) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this index and snapshots archive task Uid -func (m *IndexAndSnapshotsArchiveTaskUID) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UniversalID - if err := m.UniversalID.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this index and snapshots archive task Uid based on the context it is used -func (m *IndexAndSnapshotsArchiveTaskUID) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UniversalID - if err := m.UniversalID.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *IndexAndSnapshotsArchiveTaskUID) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IndexAndSnapshotsArchiveTaskUID) UnmarshalBinary(b []byte) error { - var res IndexAndSnapshotsArchiveTaskUID - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/index_and_snapshots_remote_protection_job_uid.go b/v1/models/index_and_snapshots_remote_protection_job_uid.go deleted file mode 100644 index aafcb1e5..00000000 --- a/v1/models/index_and_snapshots_remote_protection_job_uid.go +++ /dev/null @@ -1,96 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// IndexAndSnapshotsRemoteProtectionJobUID Protection Job Uid. -// -// Specifies a unique id assigned to the original Protection Job -// by the original Cluster that archived data to the remote Vault. -// -// swagger:model indexAndSnapshotsRemoteProtectionJobUid -type IndexAndSnapshotsRemoteProtectionJobUID struct { - UniversalID -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *IndexAndSnapshotsRemoteProtectionJobUID) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 UniversalID - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.UniversalID = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m IndexAndSnapshotsRemoteProtectionJobUID) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.UniversalID) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this index and snapshots remote protection job Uid -func (m *IndexAndSnapshotsRemoteProtectionJobUID) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UniversalID - if err := m.UniversalID.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this index and snapshots remote protection job Uid based on the context it is used -func (m *IndexAndSnapshotsRemoteProtectionJobUID) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UniversalID - if err := m.UniversalID.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *IndexAndSnapshotsRemoteProtectionJobUID) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IndexAndSnapshotsRemoteProtectionJobUID) UnmarshalBinary(b []byte) error { - var res IndexAndSnapshotsRemoteProtectionJobUID - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/mount_volume_result_details.go b/v1/models/mount_volume_result_details.go index ddc67e0d..144a41e0 100644 --- a/v1/models/mount_volume_result_details.go +++ b/v1/models/mount_volume_result_details.go @@ -21,8 +21,11 @@ import ( // swagger:model MountVolumeResultDetails type MountVolumeResultDetails struct { - // mount error - MountError *MountVolumeResultDetailsMountError `json:"mountError,omitempty"` + // Specifies the cause of the mount failure if the mounting of a + // volume failed. + MountError struct { + RequestError + } `json:"mountError,omitempty"` // Specifies the mount point where the volume is mounted. // NOTE: This field may not be populated for VM environments if the @@ -52,17 +55,6 @@ func (m *MountVolumeResultDetails) validateMountError(formats strfmt.Registry) e return nil } - if m.MountError != nil { - if err := m.MountError.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mountError") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mountError") - } - return err - } - } - return nil } @@ -82,22 +74,6 @@ func (m *MountVolumeResultDetails) ContextValidate(ctx context.Context, formats func (m *MountVolumeResultDetails) contextValidateMountError(ctx context.Context, formats strfmt.Registry) error { - if m.MountError != nil { - - if swag.IsZero(m.MountError) { // not required - return nil - } - - if err := m.MountError.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mountError") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mountError") - } - return err - } - } - return nil } diff --git a/v1/models/mount_volume_result_details_mount_error.go b/v1/models/mount_volume_result_details_mount_error.go deleted file mode 100644 index bc88869d..00000000 --- a/v1/models/mount_volume_result_details_mount_error.go +++ /dev/null @@ -1,94 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// MountVolumeResultDetailsMountError Specifies the cause of the mount failure if the mounting of a -// volume failed. -// -// swagger:model mountVolumeResultDetailsMountError -type MountVolumeResultDetailsMountError struct { - RequestError -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *MountVolumeResultDetailsMountError) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 RequestError - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.RequestError = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m MountVolumeResultDetailsMountError) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.RequestError) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this mount volume result details mount error -func (m *MountVolumeResultDetailsMountError) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with RequestError - if err := m.RequestError.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this mount volume result details mount error based on the context it is used -func (m *MountVolumeResultDetailsMountError) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with RequestError - if err := m.RequestError.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *MountVolumeResultDetailsMountError) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MountVolumeResultDetailsMountError) UnmarshalBinary(b []byte) error { - var res MountVolumeResultDetailsMountError - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/mount_volumes_state.go b/v1/models/mount_volumes_state.go index d129ec64..52df6aea 100644 --- a/v1/models/mount_volumes_state.go +++ b/v1/models/mount_volumes_state.go @@ -32,8 +32,12 @@ type MountVolumesState struct { // Specifies the results of mounting each specified volume. MountVolumeResults []*MountVolumeResultDetails `json:"mountVolumeResults"` - // other error - OtherError *MountVolumesStateOtherError `json:"otherError,omitempty"` + // Non-mount Error. + // + // Specifies an error that did not occur during the mount operation. + OtherError struct { + RequestError + } `json:"otherError,omitempty"` // Specifies the target Protection Source Id where the volumes will be // mounted. @@ -96,17 +100,6 @@ func (m *MountVolumesState) validateOtherError(formats strfmt.Registry) error { return nil } - if m.OtherError != nil { - if err := m.OtherError.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("otherError") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("otherError") - } - return err - } - } - return nil } @@ -155,22 +148,6 @@ func (m *MountVolumesState) contextValidateMountVolumeResults(ctx context.Contex func (m *MountVolumesState) contextValidateOtherError(ctx context.Context, formats strfmt.Registry) error { - if m.OtherError != nil { - - if swag.IsZero(m.OtherError) { // not required - return nil - } - - if err := m.OtherError.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("otherError") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("otherError") - } - return err - } - } - return nil } diff --git a/v1/models/mount_volumes_state_other_error.go b/v1/models/mount_volumes_state_other_error.go deleted file mode 100644 index 2bfe9873..00000000 --- a/v1/models/mount_volumes_state_other_error.go +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// MountVolumesStateOtherError Non-mount Error. -// -// Specifies an error that did not occur during the mount operation. -// -// swagger:model mountVolumesStateOtherError -type MountVolumesStateOtherError struct { - RequestError -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *MountVolumesStateOtherError) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 RequestError - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.RequestError = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m MountVolumesStateOtherError) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.RequestError) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this mount volumes state other error -func (m *MountVolumesStateOtherError) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with RequestError - if err := m.RequestError.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this mount volumes state other error based on the context it is used -func (m *MountVolumesStateOtherError) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with RequestError - if err := m.RequestError.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *MountVolumesStateOtherError) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *MountVolumesStateOtherError) UnmarshalBinary(b []byte) error { - var res MountVolumesStateOtherError - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/network_mapping_proto.go b/v1/models/network_mapping_proto.go index aafc84ee..2cab8e0c 100644 --- a/v1/models/network_mapping_proto.go +++ b/v1/models/network_mapping_proto.go @@ -23,13 +23,20 @@ type NetworkMappingProto struct { // RestoredObjectNetworkConfigProto. DisableNetwork *bool `json:"disableNetwork,omitempty"` + // Source VMs network adapter name for which mapping is selected. Example: + // "Network adapter 1", "Network adapter 2". + NetworkAdapterName *string `json:"networkAdapterName,omitempty"` + + // This will be populated for recovery of the VM to the VCD. + OrgVdcNetwork *OrgVDCNetwork `json:"orgVdcNetwork,omitempty"` + // VM's MAC address will be preserved on the new network. This value takes // priority over the value in RestoredObjectNetworkConfigProto. PreserveMacAddressOnNewNetwork *bool `json:"preserveMacAddressOnNewNetwork,omitempty"` // The network entity (i.e, either a standard switch port group or a - // distributed port group in a VMware env) that is attached to - // one of the source object. + // distributed port group or Opaque network in a VMware env) that is attached + // to one of the source object. SourceNetworkEntity *EntityProto `json:"sourceNetworkEntity,omitempty"` // The network entity (i.e, either a standard switch port group or a @@ -42,6 +49,10 @@ type NetworkMappingProto struct { func (m *NetworkMappingProto) Validate(formats strfmt.Registry) error { var res []error + if err := m.validateOrgVdcNetwork(formats); err != nil { + res = append(res, err) + } + if err := m.validateSourceNetworkEntity(formats); err != nil { res = append(res, err) } @@ -56,6 +67,25 @@ func (m *NetworkMappingProto) Validate(formats strfmt.Registry) error { return nil } +func (m *NetworkMappingProto) validateOrgVdcNetwork(formats strfmt.Registry) error { + if swag.IsZero(m.OrgVdcNetwork) { // not required + return nil + } + + if m.OrgVdcNetwork != nil { + if err := m.OrgVdcNetwork.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("orgVdcNetwork") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("orgVdcNetwork") + } + return err + } + } + + return nil +} + func (m *NetworkMappingProto) validateSourceNetworkEntity(formats strfmt.Registry) error { if swag.IsZero(m.SourceNetworkEntity) { // not required return nil @@ -98,6 +128,10 @@ func (m *NetworkMappingProto) validateTargetNetworkEntity(formats strfmt.Registr func (m *NetworkMappingProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error + if err := m.contextValidateOrgVdcNetwork(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateSourceNetworkEntity(ctx, formats); err != nil { res = append(res, err) } @@ -112,6 +146,27 @@ func (m *NetworkMappingProto) ContextValidate(ctx context.Context, formats strfm return nil } +func (m *NetworkMappingProto) contextValidateOrgVdcNetwork(ctx context.Context, formats strfmt.Registry) error { + + if m.OrgVdcNetwork != nil { + + if swag.IsZero(m.OrgVdcNetwork) { // not required + return nil + } + + if err := m.OrgVdcNetwork.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("orgVdcNetwork") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("orgVdcNetwork") + } + return err + } + } + + return nil +} + func (m *NetworkMappingProto) contextValidateSourceNetworkEntity(ctx context.Context, formats strfmt.Registry) error { if m.SourceNetworkEntity != nil { diff --git a/v1/models/object_snapshot_info.go b/v1/models/object_snapshot_info.go index 185f53cf..cd107df6 100644 --- a/v1/models/object_snapshot_info.go +++ b/v1/models/object_snapshot_info.go @@ -37,8 +37,14 @@ type ObjectSnapshotInfo struct { // Specifies the name of the Protection Job that captured the backup. JobName *string `json:"jobName,omitempty"` - // job Uid - JobUID *ObjectSnapshotInfoJobUID `json:"jobUid,omitempty"` + // Specifies the globally unique id of the Protection Job that backed up + // this object. This id is unique across Cohesity Clusters. + // Even if this object is replicated to a Remote Cohesity Cluster + // and the object is associated with a new Job, the value specified + // in this field does not change. + JobUID struct { + UniversalID + } `json:"jobUid,omitempty"` // Specifies the primary name of the object. ObjectName *string `json:"objectName,omitempty"` @@ -104,17 +110,6 @@ func (m *ObjectSnapshotInfo) validateJobUID(formats strfmt.Registry) error { return nil } - if m.JobUID != nil { - if err := m.JobUID.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("jobUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("jobUid") - } - return err - } - } - return nil } @@ -210,22 +205,6 @@ func (m *ObjectSnapshotInfo) ContextValidate(ctx context.Context, formats strfmt func (m *ObjectSnapshotInfo) contextValidateJobUID(ctx context.Context, formats strfmt.Registry) error { - if m.JobUID != nil { - - if swag.IsZero(m.JobUID) { // not required - return nil - } - - if err := m.JobUID.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("jobUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("jobUid") - } - return err - } - } - return nil } diff --git a/v1/models/object_snapshot_info_job_uid.go b/v1/models/object_snapshot_info_job_uid.go deleted file mode 100644 index dbd405b4..00000000 --- a/v1/models/object_snapshot_info_job_uid.go +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ObjectSnapshotInfoJobUID Specifies the globally unique id of the Protection Job that backed up -// this object. This id is unique across Cohesity Clusters. -// Even if this object is replicated to a Remote Cohesity Cluster -// and the object is associated with a new Job, the value specified -// in this field does not change. -// -// swagger:model objectSnapshotInfoJobUid -type ObjectSnapshotInfoJobUID struct { - UniversalID -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ObjectSnapshotInfoJobUID) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 UniversalID - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.UniversalID = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ObjectSnapshotInfoJobUID) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.UniversalID) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this object snapshot info job Uid -func (m *ObjectSnapshotInfoJobUID) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UniversalID - if err := m.UniversalID.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this object snapshot info job Uid based on the context it is used -func (m *ObjectSnapshotInfoJobUID) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UniversalID - if err := m.UniversalID.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ObjectSnapshotInfoJobUID) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ObjectSnapshotInfoJobUID) UnmarshalBinary(b []byte) error { - var res ObjectSnapshotInfoJobUID - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/object_string_identifier.go b/v1/models/object_string_identifier.go new file mode 100644 index 00000000..4a567538 --- /dev/null +++ b/v1/models/object_string_identifier.go @@ -0,0 +1,114 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// ObjectStringIdentifier Specifies an ID generated to uniquely identify an entity. +// +// swagger:model ObjectStringIdentifier +type ObjectStringIdentifier struct { + + // Specifies the unique integer entity id. This + // is unique across one cluster. Two different Cohesity clusters may have + // same int_id for two different entities. + IntID *int64 `json:"intId,omitempty"` + + // Specifies the string entity id generated for the given entity. + StringIds *StringEntityIds `json:"stringIds,omitempty"` +} + +// Validate validates this object string identifier +func (m *ObjectStringIdentifier) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateStringIds(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ObjectStringIdentifier) validateStringIds(formats strfmt.Registry) error { + if swag.IsZero(m.StringIds) { // not required + return nil + } + + if m.StringIds != nil { + if err := m.StringIds.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("stringIds") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("stringIds") + } + return err + } + } + + return nil +} + +// ContextValidate validate this object string identifier based on the context it is used +func (m *ObjectStringIdentifier) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateStringIds(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ObjectStringIdentifier) contextValidateStringIds(ctx context.Context, formats strfmt.Registry) error { + + if m.StringIds != nil { + + if swag.IsZero(m.StringIds) { // not required + return nil + } + + if err := m.StringIds.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("stringIds") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("stringIds") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ObjectStringIdentifier) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ObjectStringIdentifier) UnmarshalBinary(b []byte) error { + var res ObjectStringIdentifier + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/v1/models/perform_restore_job_state_proto.go b/v1/models/perform_restore_job_state_proto.go index 8e4f015b..65e7c65d 100644 --- a/v1/models/perform_restore_job_state_proto.go +++ b/v1/models/perform_restore_job_state_proto.go @@ -143,6 +143,9 @@ type PerformRestoreJobStateProto struct { // kRecoverVMs. RestoreKvmVmsParams *RestoreKVMVMsParams `json:"restoreKvmVmsParams,omitempty"` + // Field to indicate the objects specific customization. + RestoreObjectCustomizations []*RestoreObjectCustomization `json:"restoreObjectCustomizations"` + // An optional registered parent source to which objects are to be restored. // If not specified, objects are restored back to the original source that // was managing the objects. @@ -318,6 +321,10 @@ func (m *PerformRestoreJobStateProto) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateRestoreObjectCustomizations(formats); err != nil { + res = append(res, err) + } + if err := m.validateRestoreParentSource(formats); err != nil { res = append(res, err) } @@ -736,6 +743,32 @@ func (m *PerformRestoreJobStateProto) validateRestoreKvmVmsParams(formats strfmt return nil } +func (m *PerformRestoreJobStateProto) validateRestoreObjectCustomizations(formats strfmt.Registry) error { + if swag.IsZero(m.RestoreObjectCustomizations) { // not required + return nil + } + + for i := 0; i < len(m.RestoreObjectCustomizations); i++ { + if swag.IsZero(m.RestoreObjectCustomizations[i]) { // not required + continue + } + + if m.RestoreObjectCustomizations[i] != nil { + if err := m.RestoreObjectCustomizations[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("restoreObjectCustomizations" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("restoreObjectCustomizations" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *PerformRestoreJobStateProto) validateRestoreParentSource(formats strfmt.Registry) error { if swag.IsZero(m.RestoreParentSource) { // not required return nil @@ -1092,6 +1125,10 @@ func (m *PerformRestoreJobStateProto) ContextValidate(ctx context.Context, forma res = append(res, err) } + if err := m.contextValidateRestoreObjectCustomizations(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateRestoreParentSource(ctx, formats); err != nil { res = append(res, err) } @@ -1540,6 +1577,31 @@ func (m *PerformRestoreJobStateProto) contextValidateRestoreKvmVmsParams(ctx con return nil } +func (m *PerformRestoreJobStateProto) contextValidateRestoreObjectCustomizations(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.RestoreObjectCustomizations); i++ { + + if m.RestoreObjectCustomizations[i] != nil { + + if swag.IsZero(m.RestoreObjectCustomizations[i]) { // not required + return nil + } + + if err := m.RestoreObjectCustomizations[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("restoreObjectCustomizations" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("restoreObjectCustomizations" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *PerformRestoreJobStateProto) contextValidateRestoreParentSource(ctx context.Context, formats strfmt.Registry) error { if m.RestoreParentSource != nil { diff --git a/v1/models/perform_restore_task_state_proto.go b/v1/models/perform_restore_task_state_proto.go index 9d1d7ab4..2af3b84b 100644 --- a/v1/models/perform_restore_task_state_proto.go +++ b/v1/models/perform_restore_task_state_proto.go @@ -282,6 +282,9 @@ type PerformRestoreTaskStateProto struct { // kRecoverVMs. RestoreKvmVmsParams *RestoreKVMVMsParams `json:"restoreKvmVmsParams,omitempty"` + // Indicates the customization options for the restore objects. + RestoreObjectCustomizations []*RestoreObjectCustomization `json:"restoreObjectCustomizations"` + // This field defines the one drive specific params for restore task of type // kRecoverO365Drive. RestoreOneDriveParams *RestoreOneDriveParams `json:"restoreOneDriveParams,omitempty"` @@ -601,6 +604,10 @@ func (m *PerformRestoreTaskStateProto) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateRestoreObjectCustomizations(formats); err != nil { + res = append(res, err) + } + if err := m.validateRestoreOneDriveParams(formats); err != nil { res = append(res, err) } @@ -1327,6 +1334,32 @@ func (m *PerformRestoreTaskStateProto) validateRestoreKvmVmsParams(formats strfm return nil } +func (m *PerformRestoreTaskStateProto) validateRestoreObjectCustomizations(formats strfmt.Registry) error { + if swag.IsZero(m.RestoreObjectCustomizations) { // not required + return nil + } + + for i := 0; i < len(m.RestoreObjectCustomizations); i++ { + if swag.IsZero(m.RestoreObjectCustomizations[i]) { // not required + continue + } + + if m.RestoreObjectCustomizations[i] != nil { + if err := m.RestoreObjectCustomizations[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("restoreObjectCustomizations" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("restoreObjectCustomizations" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *PerformRestoreTaskStateProto) validateRestoreOneDriveParams(formats strfmt.Registry) error { if swag.IsZero(m.RestoreOneDriveParams) { // not required return nil @@ -1879,6 +1912,10 @@ func (m *PerformRestoreTaskStateProto) ContextValidate(ctx context.Context, form res = append(res, err) } + if err := m.contextValidateRestoreObjectCustomizations(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateRestoreOneDriveParams(ctx, formats); err != nil { res = append(res, err) } @@ -2657,6 +2694,31 @@ func (m *PerformRestoreTaskStateProto) contextValidateRestoreKvmVmsParams(ctx co return nil } +func (m *PerformRestoreTaskStateProto) contextValidateRestoreObjectCustomizations(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.RestoreObjectCustomizations); i++ { + + if m.RestoreObjectCustomizations[i] != nil { + + if swag.IsZero(m.RestoreObjectCustomizations[i]) { // not required + return nil + } + + if err := m.RestoreObjectCustomizations[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("restoreObjectCustomizations" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("restoreObjectCustomizations" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *PerformRestoreTaskStateProto) contextValidateRestoreOneDriveParams(ctx context.Context, formats strfmt.Registry) error { if m.RestoreOneDriveParams != nil { diff --git a/v1/models/peristent_volume_status.go b/v1/models/peristent_volume_status.go index 80a381d0..542c1890 100644 --- a/v1/models/peristent_volume_status.go +++ b/v1/models/peristent_volume_status.go @@ -7,7 +7,9 @@ package models import ( "context" + "strconv" + "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) @@ -17,17 +19,89 @@ import ( // swagger:model PeristentVolumeStatus type PeristentVolumeStatus struct { + // capacity represents the actual resources of the underlying volume. + Capacity []*PeristentVolumeStatusCapacityEntry `json:"capacity"` + // Describes the phase of PV i.e. whether it is bound or not. Phase *string `json:"phase,omitempty"` } // Validate validates this peristent volume status func (m *PeristentVolumeStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCapacity(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PeristentVolumeStatus) validateCapacity(formats strfmt.Registry) error { + if swag.IsZero(m.Capacity) { // not required + return nil + } + + for i := 0; i < len(m.Capacity); i++ { + if swag.IsZero(m.Capacity[i]) { // not required + continue + } + + if m.Capacity[i] != nil { + if err := m.Capacity[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("capacity" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("capacity" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + return nil } -// ContextValidate validates this peristent volume status based on context it is used +// ContextValidate validate this peristent volume status based on the context it is used func (m *PeristentVolumeStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateCapacity(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PeristentVolumeStatus) contextValidateCapacity(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Capacity); i++ { + + if m.Capacity[i] != nil { + + if swag.IsZero(m.Capacity[i]) { // not required + return nil + } + + if err := m.Capacity[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("capacity" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("capacity" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + return nil } diff --git a/v1/models/peristent_volume_status_capacity_entry.go b/v1/models/peristent_volume_status_capacity_entry.go new file mode 100644 index 00000000..bb650ee0 --- /dev/null +++ b/v1/models/peristent_volume_status_capacity_entry.go @@ -0,0 +1,53 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// PeristentVolumeStatusCapacityEntry peristent volume status capacity entry +// +// swagger:model PeristentVolumeStatus_CapacityEntry +type PeristentVolumeStatusCapacityEntry struct { + + // key + Key *string `json:"key,omitempty"` + + // value + Value *string `json:"value,omitempty"` +} + +// Validate validates this peristent volume status capacity entry +func (m *PeristentVolumeStatusCapacityEntry) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this peristent volume status capacity entry based on context it is used +func (m *PeristentVolumeStatusCapacityEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *PeristentVolumeStatusCapacityEntry) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PeristentVolumeStatusCapacityEntry) UnmarshalBinary(b []byte) error { + var res PeristentVolumeStatusCapacityEntry + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/v1/models/physical_protection_source.go b/v1/models/physical_protection_source.go index a1d642dd..7a724a10 100644 --- a/v1/models/physical_protection_source.go +++ b/v1/models/physical_protection_source.go @@ -57,8 +57,11 @@ type PhysicalProtectionSource struct { // Enum: ["kLinux","kWindows","kAix","kSolaris","kSapHana","kSapOracle","kCockroachDB","kMySQL","kOther","kSapSybase","kSapMaxDB","kSapSybaseIQ","kDB2","kSapASE","kMariaDB","kPostgreSQL","kVOS","kHPUX"] HostType *string `json:"hostType,omitempty"` - // id - ID *PhysicalProtectionSourceID `json:"id,omitempty"` + // Specifies a unique id of a Physical Protection Source. + // The id is unique across Cohesity Clusters. + ID struct { + UniversalID + } `json:"id,omitempty"` // Specifies if the physical host is a proxy host. IsProxyHost *bool `json:"isProxyHost,omitempty"` @@ -262,17 +265,6 @@ func (m *PhysicalProtectionSource) validateID(formats strfmt.Registry) error { return nil } - if m.ID != nil { - if err := m.ID.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("id") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("id") - } - return err - } - } - return nil } @@ -455,22 +447,6 @@ func (m *PhysicalProtectionSource) contextValidateAgents(ctx context.Context, fo func (m *PhysicalProtectionSource) contextValidateID(ctx context.Context, formats strfmt.Registry) error { - if m.ID != nil { - - if swag.IsZero(m.ID) { // not required - return nil - } - - if err := m.ID.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("id") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("id") - } - return err - } - } - return nil } diff --git a/v1/models/physical_protection_source_id.go b/v1/models/physical_protection_source_id.go deleted file mode 100644 index 1681d241..00000000 --- a/v1/models/physical_protection_source_id.go +++ /dev/null @@ -1,94 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// PhysicalProtectionSourceID Specifies a unique id of a Physical Protection Source. -// The id is unique across Cohesity Clusters. -// -// swagger:model physicalProtectionSourceId -type PhysicalProtectionSourceID struct { - UniversalID -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *PhysicalProtectionSourceID) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 UniversalID - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.UniversalID = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m PhysicalProtectionSourceID) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.UniversalID) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this physical protection source Id -func (m *PhysicalProtectionSourceID) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UniversalID - if err := m.UniversalID.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this physical protection source Id based on the context it is used -func (m *PhysicalProtectionSourceID) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UniversalID - if err := m.UniversalID.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *PhysicalProtectionSourceID) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *PhysicalProtectionSourceID) UnmarshalBinary(b []byte) error { - var res PhysicalProtectionSourceID - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/private_agent_entity.go b/v1/models/private_agent_entity.go index ec4c374e..f5dcc343 100644 --- a/v1/models/private_agent_entity.go +++ b/v1/models/private_agent_entity.go @@ -21,6 +21,9 @@ type PrivateAgentEntity struct { // agent cert info AgentCertInfo *AgentCertificateInformation `json:"agentCertInfo,omitempty"` + // Port on which agent is running. + AgentPort *int32 `json:"agentPort,omitempty"` + // The universal identifier of the object: // this refers to the Agent's UID and the value is shared with // physical::Entity objects if there are any. diff --git a/v1/models/private_aws_entity.go b/v1/models/private_aws_entity.go index 16de5645..9462ed39 100644 --- a/v1/models/private_aws_entity.go +++ b/v1/models/private_aws_entity.go @@ -79,6 +79,9 @@ type PrivateAwsEntity struct { // S3 bucket specific info. S3EntityInfo *PrivateS3ProtoEntity `json:"s3EntityInfo,omitempty"` + // Params required for s3 backups for the registered entity. + S3ProtectionParams *PrivateS3ProtectionParams `json:"s3ProtectionParams,omitempty"` + // Optional list of tag attributes associated with this entity. TagAttributesVec []*TagAttributes `json:"tagAttributesVec"` @@ -129,6 +132,10 @@ func (m *PrivateAwsEntity) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateS3ProtectionParams(formats); err != nil { + res = append(res, err) + } + if err := m.validateTagAttributesVec(formats); err != nil { res = append(res, err) } @@ -295,6 +302,25 @@ func (m *PrivateAwsEntity) validateS3EntityInfo(formats strfmt.Registry) error { return nil } +func (m *PrivateAwsEntity) validateS3ProtectionParams(formats strfmt.Registry) error { + if swag.IsZero(m.S3ProtectionParams) { // not required + return nil + } + + if m.S3ProtectionParams != nil { + if err := m.S3ProtectionParams.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("s3ProtectionParams") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("s3ProtectionParams") + } + return err + } + } + + return nil +} + func (m *PrivateAwsEntity) validateTagAttributesVec(formats strfmt.Registry) error { if swag.IsZero(m.TagAttributesVec) { // not required return nil @@ -383,6 +409,10 @@ func (m *PrivateAwsEntity) ContextValidate(ctx context.Context, formats strfmt.R res = append(res, err) } + if err := m.contextValidateS3ProtectionParams(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateTagAttributesVec(ctx, formats); err != nil { res = append(res, err) } @@ -565,6 +595,27 @@ func (m *PrivateAwsEntity) contextValidateS3EntityInfo(ctx context.Context, form return nil } +func (m *PrivateAwsEntity) contextValidateS3ProtectionParams(ctx context.Context, formats strfmt.Registry) error { + + if m.S3ProtectionParams != nil { + + if swag.IsZero(m.S3ProtectionParams) { // not required + return nil + } + + if err := m.S3ProtectionParams.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("s3ProtectionParams") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("s3ProtectionParams") + } + return err + } + } + + return nil +} + func (m *PrivateAwsEntity) contextValidateTagAttributesVec(ctx context.Context, formats strfmt.Registry) error { for i := 0; i < len(m.TagAttributesVec); i++ { diff --git a/v1/models/private_s3_protection_params.go b/v1/models/private_s3_protection_params.go new file mode 100644 index 00000000..84182ae1 --- /dev/null +++ b/v1/models/private_s3_protection_params.go @@ -0,0 +1,58 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// PrivateS3ProtectionParams Message representing the inventory report params required for doing +// s3 backups for the registered entity. +// +// swagger:model PrivateS3ProtectionParams +type PrivateS3ProtectionParams struct { + + // ARN of the inventory report destination bucket for S3 backups. + // This is required for doing s3 backups for the registered entity. + S3InventoryReportDestinationBucket *string `json:"s3InventoryReportDestinationBucket,omitempty"` + + // The prefix in the S3 destination bucket where inventory reports will be + // stored. This field should be in the format + // /prefix. + // This is required for doing s3 backups for the registered entity. + S3InventoryReportDestinationBucketPrefix *string `json:"s3InventoryReportDestinationBucketPrefix,omitempty"` +} + +// Validate validates this private s3 protection params +func (m *PrivateS3ProtectionParams) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this private s3 protection params based on context it is used +func (m *PrivateS3ProtectionParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *PrivateS3ProtectionParams) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PrivateS3ProtectionParams) UnmarshalBinary(b []byte) error { + var res PrivateS3ProtectionParams + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/v1/models/private_vmware_entity.go b/v1/models/private_vmware_entity.go index b8482f3a..2e1a0433 100644 --- a/v1/models/private_vmware_entity.go +++ b/v1/models/private_vmware_entity.go @@ -80,6 +80,10 @@ type PrivateVmwareEntity struct { // kVirtualMachine. HostType *int32 `json:"hostType,omitempty"` + // This field indicates the path to the entity in vSphere hierarchy. This is + // curently populated only for Datacenter entities. + InventoryPath *string `json:"inventoryPath,omitempty"` + // This field can be used to capture IP Addresses for entities that have it. // The table below captures the type if information published by an entity // type using this field. diff --git a/v1/models/protected_vm_info.go b/v1/models/protected_vm_info.go index 09bed3cd..589cd5b2 100644 --- a/v1/models/protected_vm_info.go +++ b/v1/models/protected_vm_info.go @@ -30,8 +30,10 @@ type ProtectedVMInfo struct { // Specifies a VM that is being protected on the Cohesity Cluster. ProtectionSource *ProtectionSource `json:"protectionSource,omitempty"` - // stats - Stats *ProtectedVMInfoStats `json:"stats,omitempty"` + // Specifies the protection stats of VM. + Stats struct { + ProtectionSummary + } `json:"stats,omitempty"` } // Validate validates this protected Vm info @@ -136,17 +138,6 @@ func (m *ProtectedVMInfo) validateStats(formats strfmt.Registry) error { return nil } - if m.Stats != nil { - if err := m.Stats.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("stats") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("stats") - } - return err - } - } - return nil } @@ -249,22 +240,6 @@ func (m *ProtectedVMInfo) contextValidateProtectionSource(ctx context.Context, f func (m *ProtectedVMInfo) contextValidateStats(ctx context.Context, formats strfmt.Registry) error { - if m.Stats != nil { - - if swag.IsZero(m.Stats) { // not required - return nil - } - - if err := m.Stats.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("stats") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("stats") - } - return err - } - } - return nil } diff --git a/v1/models/protected_vm_info_stats.go b/v1/models/protected_vm_info_stats.go deleted file mode 100644 index 6c559cec..00000000 --- a/v1/models/protected_vm_info_stats.go +++ /dev/null @@ -1,93 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectedVMInfoStats Specifies the protection stats of VM. -// -// swagger:model protectedVmInfoStats -type ProtectedVMInfoStats struct { - ProtectionSummary -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ProtectedVMInfoStats) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 ProtectionSummary - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.ProtectionSummary = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ProtectedVMInfoStats) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.ProtectionSummary) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this protected Vm info stats -func (m *ProtectedVMInfoStats) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ProtectionSummary - if err := m.ProtectionSummary.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this protected Vm info stats based on the context it is used -func (m *ProtectedVMInfoStats) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ProtectionSummary - if err := m.ProtectionSummary.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectedVMInfoStats) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectedVMInfoStats) UnmarshalBinary(b []byte) error { - var res ProtectedVMInfoStats - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_job.go b/v1/models/protection_job.go index 0720b2c1..34034763 100644 --- a/v1/models/protection_job.go +++ b/v1/models/protection_job.go @@ -196,8 +196,16 @@ type ProtectionJob struct { // the SLA time period specified for this backup schedule. FullProtectionSLATimeMins *int64 `json:"fullProtectionSlaTimeMins,omitempty"` - // full protection start time - FullProtectionStartTime *ProtectionJobFullProtectionStartTime `json:"fullProtectionStartTime,omitempty"` + // Full (no CBT) Protection Schedule Start Time. + // + // Specifies the time of day to start the Full Protection Schedule. + // This is optional and only applicable if the Protection Policy defines + // a monthly or a daily Full (no CBT) Protection Schedule. + // Default value is 02:00 AM. + // deprecated: true + FullProtectionStartTime struct { + TimeOfDay + } `json:"fullProtectionStartTime,omitempty"` // Specifies an id for the Protection Job. ID *int64 `json:"id,omitempty"` @@ -212,8 +220,16 @@ type ProtectionJob struct { // the SLA time period specified for this backup schedule. IncrementalProtectionSLATimeMins *int64 `json:"incrementalProtectionSlaTimeMins,omitempty"` - // incremental protection start time - IncrementalProtectionStartTime *ProtectionJobIncrementalProtectionStartTime `json:"incrementalProtectionStartTime,omitempty"` + // CBT-based Protection Schedule Start Time. + // + // Specifies the time of day to start the CBT-based Protection Schedule. + // This is optional and only applicable if the Protection Policy defines + // a monthly or a daily CBT-based Protection Schedule. + // Default value is 02:00 AM. + // deprecated: true + IncrementalProtectionStartTime struct { + TimeOfDay + } `json:"incrementalProtectionStartTime,omitempty"` // Specifies the settings for indexing files found in an Object // (such as a VM) so these files can be searched and recovered. @@ -331,11 +347,20 @@ type ProtectionJob struct { // Required: true PolicyID *string `json:"policyId"` - // post backup script - PostBackupScript *ProtectionJobPostBackupScript `json:"postBackupScript,omitempty"` - - // pre backup script - PreBackupScript *ProtectionJobPreBackupScript `json:"preBackupScript,omitempty"` + // Specifies the script associated with the backup job. This field must be + // specified for 'kPhysical' jobs. This script will be executed post backup + // run. + PostBackupScript struct { + BackupScript + } `json:"postBackupScript,omitempty"` + + // Specifies the script associated with the backup job. This field must be + // specified for 'kPhysical' jobs. This script will be executed pre backup + // run. The 'remoteScript' field will be used for remote adapter jobs and + // 'preBackupScript' field will be used for 'kPhysical' jobs. + PreBackupScript struct { + BackupScript + } `json:"preBackupScript,omitempty"` // Specifies the priority of execution for a Protection Job. // Cohesity supports concurrent backups but if the number of Jobs exceeds @@ -367,8 +392,12 @@ type ProtectionJob struct { // on the guest Operating System. Quiesce *bool `json:"quiesce,omitempty"` - // remote script - RemoteScript *ProtectionJobRemoteScript `json:"remoteScript,omitempty"` + // For a Remote Adapter 'kPuppeteer' Job, this field specifies the + // settings about the remote script that will be executed by this Job. + // Only specify this field for Remote Adapter 'kPuppeteer' Jobs. + RemoteScript struct { + RemoteJobScript + } `json:"remoteScript,omitempty"` // Sepcifies the remote view names for the views that are being protected in // the view job. Use this field only when job has a replication policy. @@ -412,8 +441,15 @@ type ProtectionJob struct { // when IncludeSourceNames is set to true and the environment is O365. Sources []*SourceInfo `json:"sources"` - // start time - StartTime *ProtectionJobStartTime `json:"startTime,omitempty"` + // Protection Schedule Start Time. + // + // Specifies the time of day to start the Protection Schedule. + // This is optional and only applicable if the Protection Policy defines + // a monthly or a daily Protection Schedule. + // Default value is 02:00 AM. + StartTime struct { + TimeOfDay + } `json:"startTime,omitempty"` // Specifies the summary stats of the Protection Job. // This field is set only if it was requested. @@ -431,8 +467,11 @@ type ProtectionJob struct { // for example: "America/New_York". Timezone *string `json:"timezone,omitempty"` - // uid - UID *ProtectionJobUID `json:"uid,omitempty"` + // Specifies a global Protection Job id that is unique across Cohesity + // Clusters. + UID struct { + UniversalID + } `json:"uid,omitempty"` // Tags associated with the job. User can specify tags/keywords that can // indexed by Yoda and can be later searched in UI. For example, user can @@ -881,17 +920,6 @@ func (m *ProtectionJob) validateFullProtectionStartTime(formats strfmt.Registry) return nil } - if m.FullProtectionStartTime != nil { - if err := m.FullProtectionStartTime.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fullProtectionStartTime") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fullProtectionStartTime") - } - return err - } - } - return nil } @@ -900,17 +928,6 @@ func (m *ProtectionJob) validateIncrementalProtectionStartTime(formats strfmt.Re return nil } - if m.IncrementalProtectionStartTime != nil { - if err := m.IncrementalProtectionStartTime.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("incrementalProtectionStartTime") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("incrementalProtectionStartTime") - } - return err - } - } - return nil } @@ -1001,17 +1018,6 @@ func (m *ProtectionJob) validatePostBackupScript(formats strfmt.Registry) error return nil } - if m.PostBackupScript != nil { - if err := m.PostBackupScript.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("postBackupScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("postBackupScript") - } - return err - } - } - return nil } @@ -1020,17 +1026,6 @@ func (m *ProtectionJob) validatePreBackupScript(formats strfmt.Registry) error { return nil } - if m.PreBackupScript != nil { - if err := m.PreBackupScript.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("preBackupScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("preBackupScript") - } - return err - } - } - return nil } @@ -1132,17 +1127,6 @@ func (m *ProtectionJob) validateRemoteScript(formats strfmt.Registry) error { return nil } - if m.RemoteScript != nil { - if err := m.RemoteScript.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("remoteScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("remoteScript") - } - return err - } - } - return nil } @@ -1230,17 +1214,6 @@ func (m *ProtectionJob) validateStartTime(formats strfmt.Registry) error { return nil } - if m.StartTime != nil { - if err := m.StartTime.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("startTime") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("startTime") - } - return err - } - } - return nil } @@ -1294,17 +1267,6 @@ func (m *ProtectionJob) validateUID(formats strfmt.Registry) error { return nil } - if m.UID != nil { - if err := m.UID.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("uid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("uid") - } - return err - } - } - return nil } @@ -1489,43 +1451,11 @@ func (m *ProtectionJob) contextValidateEnvironmentParameters(ctx context.Context func (m *ProtectionJob) contextValidateFullProtectionStartTime(ctx context.Context, formats strfmt.Registry) error { - if m.FullProtectionStartTime != nil { - - if swag.IsZero(m.FullProtectionStartTime) { // not required - return nil - } - - if err := m.FullProtectionStartTime.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fullProtectionStartTime") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fullProtectionStartTime") - } - return err - } - } - return nil } func (m *ProtectionJob) contextValidateIncrementalProtectionStartTime(ctx context.Context, formats strfmt.Registry) error { - if m.IncrementalProtectionStartTime != nil { - - if swag.IsZero(m.IncrementalProtectionStartTime) { // not required - return nil - } - - if err := m.IncrementalProtectionStartTime.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("incrementalProtectionStartTime") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("incrementalProtectionStartTime") - } - return err - } - } - return nil } @@ -1598,64 +1528,16 @@ func (m *ProtectionJob) contextValidateMissingEntities(ctx context.Context, form func (m *ProtectionJob) contextValidatePostBackupScript(ctx context.Context, formats strfmt.Registry) error { - if m.PostBackupScript != nil { - - if swag.IsZero(m.PostBackupScript) { // not required - return nil - } - - if err := m.PostBackupScript.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("postBackupScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("postBackupScript") - } - return err - } - } - return nil } func (m *ProtectionJob) contextValidatePreBackupScript(ctx context.Context, formats strfmt.Registry) error { - if m.PreBackupScript != nil { - - if swag.IsZero(m.PreBackupScript) { // not required - return nil - } - - if err := m.PreBackupScript.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("preBackupScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("preBackupScript") - } - return err - } - } - return nil } func (m *ProtectionJob) contextValidateRemoteScript(ctx context.Context, formats strfmt.Registry) error { - if m.RemoteScript != nil { - - if swag.IsZero(m.RemoteScript) { // not required - return nil - } - - if err := m.RemoteScript.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("remoteScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("remoteScript") - } - return err - } - } - return nil } @@ -1736,22 +1618,6 @@ func (m *ProtectionJob) contextValidateSources(ctx context.Context, formats strf func (m *ProtectionJob) contextValidateStartTime(ctx context.Context, formats strfmt.Registry) error { - if m.StartTime != nil { - - if swag.IsZero(m.StartTime) { // not required - return nil - } - - if err := m.StartTime.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("startTime") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("startTime") - } - return err - } - } - return nil } @@ -1803,22 +1669,6 @@ func (m *ProtectionJob) contextValidateTaskTimeouts(ctx context.Context, formats func (m *ProtectionJob) contextValidateUID(ctx context.Context, formats strfmt.Registry) error { - if m.UID != nil { - - if swag.IsZero(m.UID) { // not required - return nil - } - - if err := m.UID.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("uid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("uid") - } - return err - } - } - return nil } diff --git a/v1/models/protection_job_full_protection_start_time.go b/v1/models/protection_job_full_protection_start_time.go deleted file mode 100644 index e7b29c08..00000000 --- a/v1/models/protection_job_full_protection_start_time.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionJobFullProtectionStartTime Full (no CBT) Protection Schedule Start Time. -// -// Specifies the time of day to start the Full Protection Schedule. -// This is optional and only applicable if the Protection Policy defines -// a monthly or a daily Full (no CBT) Protection Schedule. -// Default value is 02:00 AM. -// deprecated: true -// -// swagger:model protectionJobFullProtectionStartTime -type ProtectionJobFullProtectionStartTime struct { - TimeOfDay -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ProtectionJobFullProtectionStartTime) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 TimeOfDay - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.TimeOfDay = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ProtectionJobFullProtectionStartTime) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.TimeOfDay) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this protection job full protection start time -func (m *ProtectionJobFullProtectionStartTime) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with TimeOfDay - if err := m.TimeOfDay.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this protection job full protection start time based on the context it is used -func (m *ProtectionJobFullProtectionStartTime) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with TimeOfDay - if err := m.TimeOfDay.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionJobFullProtectionStartTime) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionJobFullProtectionStartTime) UnmarshalBinary(b []byte) error { - var res ProtectionJobFullProtectionStartTime - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_job_incremental_protection_start_time.go b/v1/models/protection_job_incremental_protection_start_time.go deleted file mode 100644 index 7492a243..00000000 --- a/v1/models/protection_job_incremental_protection_start_time.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionJobIncrementalProtectionStartTime CBT-based Protection Schedule Start Time. -// -// Specifies the time of day to start the CBT-based Protection Schedule. -// This is optional and only applicable if the Protection Policy defines -// a monthly or a daily CBT-based Protection Schedule. -// Default value is 02:00 AM. -// deprecated: true -// -// swagger:model protectionJobIncrementalProtectionStartTime -type ProtectionJobIncrementalProtectionStartTime struct { - TimeOfDay -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ProtectionJobIncrementalProtectionStartTime) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 TimeOfDay - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.TimeOfDay = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ProtectionJobIncrementalProtectionStartTime) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.TimeOfDay) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this protection job incremental protection start time -func (m *ProtectionJobIncrementalProtectionStartTime) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with TimeOfDay - if err := m.TimeOfDay.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this protection job incremental protection start time based on the context it is used -func (m *ProtectionJobIncrementalProtectionStartTime) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with TimeOfDay - if err := m.TimeOfDay.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionJobIncrementalProtectionStartTime) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionJobIncrementalProtectionStartTime) UnmarshalBinary(b []byte) error { - var res ProtectionJobIncrementalProtectionStartTime - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_job_post_backup_script.go b/v1/models/protection_job_post_backup_script.go deleted file mode 100644 index 1d6a65e3..00000000 --- a/v1/models/protection_job_post_backup_script.go +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionJobPostBackupScript Specifies the script associated with the backup job. This field must be -// specified for 'kPhysical' jobs. This script will be executed post backup -// run. -// -// swagger:model protectionJobPostBackupScript -type ProtectionJobPostBackupScript struct { - BackupScript -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ProtectionJobPostBackupScript) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 BackupScript - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.BackupScript = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ProtectionJobPostBackupScript) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.BackupScript) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this protection job post backup script -func (m *ProtectionJobPostBackupScript) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with BackupScript - if err := m.BackupScript.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this protection job post backup script based on the context it is used -func (m *ProtectionJobPostBackupScript) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with BackupScript - if err := m.BackupScript.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionJobPostBackupScript) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionJobPostBackupScript) UnmarshalBinary(b []byte) error { - var res ProtectionJobPostBackupScript - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_job_pre_backup_script.go b/v1/models/protection_job_pre_backup_script.go deleted file mode 100644 index 217bdb0f..00000000 --- a/v1/models/protection_job_pre_backup_script.go +++ /dev/null @@ -1,96 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionJobPreBackupScript Specifies the script associated with the backup job. This field must be -// specified for 'kPhysical' jobs. This script will be executed pre backup -// run. The 'remoteScript' field will be used for remote adapter jobs and -// 'preBackupScript' field will be used for 'kPhysical' jobs. -// -// swagger:model protectionJobPreBackupScript -type ProtectionJobPreBackupScript struct { - BackupScript -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ProtectionJobPreBackupScript) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 BackupScript - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.BackupScript = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ProtectionJobPreBackupScript) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.BackupScript) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this protection job pre backup script -func (m *ProtectionJobPreBackupScript) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with BackupScript - if err := m.BackupScript.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this protection job pre backup script based on the context it is used -func (m *ProtectionJobPreBackupScript) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with BackupScript - if err := m.BackupScript.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionJobPreBackupScript) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionJobPreBackupScript) UnmarshalBinary(b []byte) error { - var res ProtectionJobPreBackupScript - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_job_remote_script.go b/v1/models/protection_job_remote_script.go deleted file mode 100644 index 6ff62832..00000000 --- a/v1/models/protection_job_remote_script.go +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionJobRemoteScript For a Remote Adapter 'kPuppeteer' Job, this field specifies the -// settings about the remote script that will be executed by this Job. -// Only specify this field for Remote Adapter 'kPuppeteer' Jobs. -// -// swagger:model protectionJobRemoteScript -type ProtectionJobRemoteScript struct { - RemoteJobScript -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ProtectionJobRemoteScript) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 RemoteJobScript - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.RemoteJobScript = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ProtectionJobRemoteScript) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.RemoteJobScript) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this protection job remote script -func (m *ProtectionJobRemoteScript) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with RemoteJobScript - if err := m.RemoteJobScript.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this protection job remote script based on the context it is used -func (m *ProtectionJobRemoteScript) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with RemoteJobScript - if err := m.RemoteJobScript.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionJobRemoteScript) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionJobRemoteScript) UnmarshalBinary(b []byte) error { - var res ProtectionJobRemoteScript - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_job_request_body.go b/v1/models/protection_job_request_body.go index b58b76da..a6146580 100644 --- a/v1/models/protection_job_request_body.go +++ b/v1/models/protection_job_request_body.go @@ -193,8 +193,16 @@ type ProtectionJobRequestBody struct { // the SLA time period specified for this backup schedule. FullProtectionSLATimeMins *int64 `json:"fullProtectionSlaTimeMins,omitempty"` - // full protection start time - FullProtectionStartTime *ProtectionJobRequestBodyFullProtectionStartTime `json:"fullProtectionStartTime,omitempty"` + // Full (no CBT) Protection Schedule Start Time. + // + // Specifies the time of day to start the Full Protection Schedule. + // This is optional and only applicable if the Protection Policy defines + // a monthly or a daily Full (no CBT) Protection Schedule. + // Default value is 02:00 AM. + // deprecated: true + FullProtectionStartTime struct { + TimeOfDay + } `json:"fullProtectionStartTime,omitempty"` // Specifies the errors which we can ignore from showing to the user. IgnorableErrorsInErrorDb []int32 `json:"ignorableErrorsInErrorDb"` @@ -206,8 +214,16 @@ type ProtectionJobRequestBody struct { // the SLA time period specified for this backup schedule. IncrementalProtectionSLATimeMins *int64 `json:"incrementalProtectionSlaTimeMins,omitempty"` - // incremental protection start time - IncrementalProtectionStartTime *ProtectionJobRequestBodyIncrementalProtectionStartTime `json:"incrementalProtectionStartTime,omitempty"` + // CBT-based Protection Schedule Start Time. + // + // Specifies the time of day to start the CBT-based Protection Schedule. + // This is optional and only applicable if the Protection Policy defines + // a monthly or a daily CBT-based Protection Schedule. + // Default value is 02:00 AM. + // deprecated: true + IncrementalProtectionStartTime struct { + TimeOfDay + } `json:"incrementalProtectionStartTime,omitempty"` // Specifies the settings for indexing files found in an Object // (such as a VM) so these files can be searched and recovered. @@ -294,11 +310,20 @@ type ProtectionJobRequestBody struct { // Required: true PolicyID *string `json:"policyId"` - // post backup script - PostBackupScript *ProtectionJobRequestBodyPostBackupScript `json:"postBackupScript,omitempty"` - - // pre backup script - PreBackupScript *ProtectionJobRequestBodyPreBackupScript `json:"preBackupScript,omitempty"` + // Specifies the script associated with the backup job. This field must be + // specified for 'kPhysical' jobs. This script will be executed post backup + // run. + PostBackupScript struct { + BackupScript + } `json:"postBackupScript,omitempty"` + + // Specifies the script associated with the backup job. This field must be + // specified for 'kPhysical' jobs. This script will be executed pre backup + // run. The 'remoteScript' field will be used for remote adapter jobs and + // 'preBackupScript' field will be used for 'kPhysical' jobs. + PreBackupScript struct { + BackupScript + } `json:"preBackupScript,omitempty"` // Specifies the priority of execution for a Protection Job. // Cohesity supports concurrent backups but if the number of Jobs exceeds @@ -330,8 +355,12 @@ type ProtectionJobRequestBody struct { // on the guest Operating System. Quiesce *bool `json:"quiesce,omitempty"` - // remote script - RemoteScript *ProtectionJobRequestBodyRemoteScript `json:"remoteScript,omitempty"` + // For a Remote Adapter 'kPuppeteer' Job, this field specifies the + // settings about the remote script that will be executed by this Job. + // Only specify this field for Remote Adapter 'kPuppeteer' Jobs. + RemoteScript struct { + RemoteJobScript + } `json:"remoteScript,omitempty"` // Sepcifies the remote view names for the views that are being protected in // the view job. Use this field only when job has a replication policy. @@ -375,8 +404,15 @@ type ProtectionJobRequestBody struct { // when IncludeSourceNames is set to true and the environment is O365. Sources []*SourceInfo `json:"sources"` - // start time - StartTime *ProtectionJobRequestBodyStartTime `json:"startTime,omitempty"` + // Protection Schedule Start Time. + // + // Specifies the time of day to start the Protection Schedule. + // This is optional and only applicable if the Protection Policy defines + // a monthly or a daily Protection Schedule. + // Default value is 02:00 AM. + StartTime struct { + TimeOfDay + } `json:"startTime,omitempty"` // Specifies task level timeouts for a job. TaskTimeouts []*CancellationTimeoutParams `json:"taskTimeouts"` @@ -818,17 +854,6 @@ func (m *ProtectionJobRequestBody) validateFullProtectionStartTime(formats strfm return nil } - if m.FullProtectionStartTime != nil { - if err := m.FullProtectionStartTime.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fullProtectionStartTime") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fullProtectionStartTime") - } - return err - } - } - return nil } @@ -837,17 +862,6 @@ func (m *ProtectionJobRequestBody) validateIncrementalProtectionStartTime(format return nil } - if m.IncrementalProtectionStartTime != nil { - if err := m.IncrementalProtectionStartTime.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("incrementalProtectionStartTime") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("incrementalProtectionStartTime") - } - return err - } - } - return nil } @@ -893,17 +907,6 @@ func (m *ProtectionJobRequestBody) validatePostBackupScript(formats strfmt.Regis return nil } - if m.PostBackupScript != nil { - if err := m.PostBackupScript.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("postBackupScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("postBackupScript") - } - return err - } - } - return nil } @@ -912,17 +915,6 @@ func (m *ProtectionJobRequestBody) validatePreBackupScript(formats strfmt.Regist return nil } - if m.PreBackupScript != nil { - if err := m.PreBackupScript.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("preBackupScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("preBackupScript") - } - return err - } - } - return nil } @@ -1024,17 +1016,6 @@ func (m *ProtectionJobRequestBody) validateRemoteScript(formats strfmt.Registry) return nil } - if m.RemoteScript != nil { - if err := m.RemoteScript.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("remoteScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("remoteScript") - } - return err - } - } - return nil } @@ -1122,17 +1103,6 @@ func (m *ProtectionJobRequestBody) validateStartTime(formats strfmt.Registry) er return nil } - if m.StartTime != nil { - if err := m.StartTime.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("startTime") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("startTime") - } - return err - } - } - return nil } @@ -1327,43 +1297,11 @@ func (m *ProtectionJobRequestBody) contextValidateEnvironmentParameters(ctx cont func (m *ProtectionJobRequestBody) contextValidateFullProtectionStartTime(ctx context.Context, formats strfmt.Registry) error { - if m.FullProtectionStartTime != nil { - - if swag.IsZero(m.FullProtectionStartTime) { // not required - return nil - } - - if err := m.FullProtectionStartTime.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fullProtectionStartTime") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fullProtectionStartTime") - } - return err - } - } - return nil } func (m *ProtectionJobRequestBody) contextValidateIncrementalProtectionStartTime(ctx context.Context, formats strfmt.Registry) error { - if m.IncrementalProtectionStartTime != nil { - - if swag.IsZero(m.IncrementalProtectionStartTime) { // not required - return nil - } - - if err := m.IncrementalProtectionStartTime.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("incrementalProtectionStartTime") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("incrementalProtectionStartTime") - } - return err - } - } - return nil } @@ -1390,64 +1328,16 @@ func (m *ProtectionJobRequestBody) contextValidateIndexingPolicy(ctx context.Con func (m *ProtectionJobRequestBody) contextValidatePostBackupScript(ctx context.Context, formats strfmt.Registry) error { - if m.PostBackupScript != nil { - - if swag.IsZero(m.PostBackupScript) { // not required - return nil - } - - if err := m.PostBackupScript.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("postBackupScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("postBackupScript") - } - return err - } - } - return nil } func (m *ProtectionJobRequestBody) contextValidatePreBackupScript(ctx context.Context, formats strfmt.Registry) error { - if m.PreBackupScript != nil { - - if swag.IsZero(m.PreBackupScript) { // not required - return nil - } - - if err := m.PreBackupScript.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("preBackupScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("preBackupScript") - } - return err - } - } - return nil } func (m *ProtectionJobRequestBody) contextValidateRemoteScript(ctx context.Context, formats strfmt.Registry) error { - if m.RemoteScript != nil { - - if swag.IsZero(m.RemoteScript) { // not required - return nil - } - - if err := m.RemoteScript.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("remoteScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("remoteScript") - } - return err - } - } - return nil } @@ -1528,22 +1418,6 @@ func (m *ProtectionJobRequestBody) contextValidateSources(ctx context.Context, f func (m *ProtectionJobRequestBody) contextValidateStartTime(ctx context.Context, formats strfmt.Registry) error { - if m.StartTime != nil { - - if swag.IsZero(m.StartTime) { // not required - return nil - } - - if err := m.StartTime.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("startTime") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("startTime") - } - return err - } - } - return nil } diff --git a/v1/models/protection_job_request_body_full_protection_start_time.go b/v1/models/protection_job_request_body_full_protection_start_time.go deleted file mode 100644 index 2d959e53..00000000 --- a/v1/models/protection_job_request_body_full_protection_start_time.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionJobRequestBodyFullProtectionStartTime Full (no CBT) Protection Schedule Start Time. -// -// Specifies the time of day to start the Full Protection Schedule. -// This is optional and only applicable if the Protection Policy defines -// a monthly or a daily Full (no CBT) Protection Schedule. -// Default value is 02:00 AM. -// deprecated: true -// -// swagger:model protectionJobRequestBodyFullProtectionStartTime -type ProtectionJobRequestBodyFullProtectionStartTime struct { - TimeOfDay -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ProtectionJobRequestBodyFullProtectionStartTime) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 TimeOfDay - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.TimeOfDay = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ProtectionJobRequestBodyFullProtectionStartTime) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.TimeOfDay) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this protection job request body full protection start time -func (m *ProtectionJobRequestBodyFullProtectionStartTime) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with TimeOfDay - if err := m.TimeOfDay.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this protection job request body full protection start time based on the context it is used -func (m *ProtectionJobRequestBodyFullProtectionStartTime) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with TimeOfDay - if err := m.TimeOfDay.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionJobRequestBodyFullProtectionStartTime) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionJobRequestBodyFullProtectionStartTime) UnmarshalBinary(b []byte) error { - var res ProtectionJobRequestBodyFullProtectionStartTime - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_job_request_body_incremental_protection_start_time.go b/v1/models/protection_job_request_body_incremental_protection_start_time.go deleted file mode 100644 index 7e279427..00000000 --- a/v1/models/protection_job_request_body_incremental_protection_start_time.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionJobRequestBodyIncrementalProtectionStartTime CBT-based Protection Schedule Start Time. -// -// Specifies the time of day to start the CBT-based Protection Schedule. -// This is optional and only applicable if the Protection Policy defines -// a monthly or a daily CBT-based Protection Schedule. -// Default value is 02:00 AM. -// deprecated: true -// -// swagger:model protectionJobRequestBodyIncrementalProtectionStartTime -type ProtectionJobRequestBodyIncrementalProtectionStartTime struct { - TimeOfDay -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ProtectionJobRequestBodyIncrementalProtectionStartTime) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 TimeOfDay - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.TimeOfDay = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ProtectionJobRequestBodyIncrementalProtectionStartTime) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.TimeOfDay) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this protection job request body incremental protection start time -func (m *ProtectionJobRequestBodyIncrementalProtectionStartTime) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with TimeOfDay - if err := m.TimeOfDay.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this protection job request body incremental protection start time based on the context it is used -func (m *ProtectionJobRequestBodyIncrementalProtectionStartTime) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with TimeOfDay - if err := m.TimeOfDay.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionJobRequestBodyIncrementalProtectionStartTime) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionJobRequestBodyIncrementalProtectionStartTime) UnmarshalBinary(b []byte) error { - var res ProtectionJobRequestBodyIncrementalProtectionStartTime - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_job_request_body_post_backup_script.go b/v1/models/protection_job_request_body_post_backup_script.go deleted file mode 100644 index 9744f4ac..00000000 --- a/v1/models/protection_job_request_body_post_backup_script.go +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionJobRequestBodyPostBackupScript Specifies the script associated with the backup job. This field must be -// specified for 'kPhysical' jobs. This script will be executed post backup -// run. -// -// swagger:model protectionJobRequestBodyPostBackupScript -type ProtectionJobRequestBodyPostBackupScript struct { - BackupScript -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ProtectionJobRequestBodyPostBackupScript) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 BackupScript - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.BackupScript = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ProtectionJobRequestBodyPostBackupScript) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.BackupScript) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this protection job request body post backup script -func (m *ProtectionJobRequestBodyPostBackupScript) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with BackupScript - if err := m.BackupScript.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this protection job request body post backup script based on the context it is used -func (m *ProtectionJobRequestBodyPostBackupScript) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with BackupScript - if err := m.BackupScript.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionJobRequestBodyPostBackupScript) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionJobRequestBodyPostBackupScript) UnmarshalBinary(b []byte) error { - var res ProtectionJobRequestBodyPostBackupScript - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_job_request_body_pre_backup_script.go b/v1/models/protection_job_request_body_pre_backup_script.go deleted file mode 100644 index b65a5234..00000000 --- a/v1/models/protection_job_request_body_pre_backup_script.go +++ /dev/null @@ -1,96 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionJobRequestBodyPreBackupScript Specifies the script associated with the backup job. This field must be -// specified for 'kPhysical' jobs. This script will be executed pre backup -// run. The 'remoteScript' field will be used for remote adapter jobs and -// 'preBackupScript' field will be used for 'kPhysical' jobs. -// -// swagger:model protectionJobRequestBodyPreBackupScript -type ProtectionJobRequestBodyPreBackupScript struct { - BackupScript -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ProtectionJobRequestBodyPreBackupScript) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 BackupScript - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.BackupScript = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ProtectionJobRequestBodyPreBackupScript) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.BackupScript) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this protection job request body pre backup script -func (m *ProtectionJobRequestBodyPreBackupScript) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with BackupScript - if err := m.BackupScript.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this protection job request body pre backup script based on the context it is used -func (m *ProtectionJobRequestBodyPreBackupScript) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with BackupScript - if err := m.BackupScript.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionJobRequestBodyPreBackupScript) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionJobRequestBodyPreBackupScript) UnmarshalBinary(b []byte) error { - var res ProtectionJobRequestBodyPreBackupScript - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_job_request_body_remote_script.go b/v1/models/protection_job_request_body_remote_script.go deleted file mode 100644 index b5808623..00000000 --- a/v1/models/protection_job_request_body_remote_script.go +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionJobRequestBodyRemoteScript For a Remote Adapter 'kPuppeteer' Job, this field specifies the -// settings about the remote script that will be executed by this Job. -// Only specify this field for Remote Adapter 'kPuppeteer' Jobs. -// -// swagger:model protectionJobRequestBodyRemoteScript -type ProtectionJobRequestBodyRemoteScript struct { - RemoteJobScript -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ProtectionJobRequestBodyRemoteScript) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 RemoteJobScript - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.RemoteJobScript = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ProtectionJobRequestBodyRemoteScript) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.RemoteJobScript) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this protection job request body remote script -func (m *ProtectionJobRequestBodyRemoteScript) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with RemoteJobScript - if err := m.RemoteJobScript.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this protection job request body remote script based on the context it is used -func (m *ProtectionJobRequestBodyRemoteScript) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with RemoteJobScript - if err := m.RemoteJobScript.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionJobRequestBodyRemoteScript) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionJobRequestBodyRemoteScript) UnmarshalBinary(b []byte) error { - var res ProtectionJobRequestBodyRemoteScript - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_job_request_body_start_time.go b/v1/models/protection_job_request_body_start_time.go deleted file mode 100644 index 907a77d2..00000000 --- a/v1/models/protection_job_request_body_start_time.go +++ /dev/null @@ -1,98 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionJobRequestBodyStartTime Protection Schedule Start Time. -// -// Specifies the time of day to start the Protection Schedule. -// This is optional and only applicable if the Protection Policy defines -// a monthly or a daily Protection Schedule. -// Default value is 02:00 AM. -// -// swagger:model protectionJobRequestBodyStartTime -type ProtectionJobRequestBodyStartTime struct { - TimeOfDay -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ProtectionJobRequestBodyStartTime) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 TimeOfDay - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.TimeOfDay = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ProtectionJobRequestBodyStartTime) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.TimeOfDay) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this protection job request body start time -func (m *ProtectionJobRequestBodyStartTime) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with TimeOfDay - if err := m.TimeOfDay.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this protection job request body start time based on the context it is used -func (m *ProtectionJobRequestBodyStartTime) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with TimeOfDay - if err := m.TimeOfDay.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionJobRequestBodyStartTime) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionJobRequestBodyStartTime) UnmarshalBinary(b []byte) error { - var res ProtectionJobRequestBodyStartTime - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_job_start_time.go b/v1/models/protection_job_start_time.go deleted file mode 100644 index d5c7808c..00000000 --- a/v1/models/protection_job_start_time.go +++ /dev/null @@ -1,98 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionJobStartTime Protection Schedule Start Time. -// -// Specifies the time of day to start the Protection Schedule. -// This is optional and only applicable if the Protection Policy defines -// a monthly or a daily Protection Schedule. -// Default value is 02:00 AM. -// -// swagger:model protectionJobStartTime -type ProtectionJobStartTime struct { - TimeOfDay -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ProtectionJobStartTime) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 TimeOfDay - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.TimeOfDay = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ProtectionJobStartTime) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.TimeOfDay) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this protection job start time -func (m *ProtectionJobStartTime) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with TimeOfDay - if err := m.TimeOfDay.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this protection job start time based on the context it is used -func (m *ProtectionJobStartTime) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with TimeOfDay - if err := m.TimeOfDay.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionJobStartTime) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionJobStartTime) UnmarshalBinary(b []byte) error { - var res ProtectionJobStartTime - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_job_uid.go b/v1/models/protection_job_uid.go deleted file mode 100644 index 9dce0255..00000000 --- a/v1/models/protection_job_uid.go +++ /dev/null @@ -1,94 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionJobUID Specifies a global Protection Job id that is unique across Cohesity -// Clusters. -// -// swagger:model protectionJobUid -type ProtectionJobUID struct { - UniversalID -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ProtectionJobUID) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 UniversalID - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.UniversalID = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ProtectionJobUID) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.UniversalID) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this protection job Uid -func (m *ProtectionJobUID) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UniversalID - if err := m.UniversalID.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this protection job Uid based on the context it is used -func (m *ProtectionJobUID) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UniversalID - if err := m.UniversalID.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionJobUID) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionJobUID) UnmarshalBinary(b []byte) error { - var res ProtectionJobUID - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_object_summary.go b/v1/models/protection_object_summary.go index b913c874..6107396e 100644 --- a/v1/models/protection_object_summary.go +++ b/v1/models/protection_object_summary.go @@ -37,8 +37,10 @@ type ProtectionObjectSummary struct { // Returns the list of Protection Jobs with summary Information. ProtectionJobs []*ProtectionRunInstance `json:"protectionJobs"` - // protection source - ProtectionSource *ProtectionObjectSummaryProtectionSource `json:"protectionSource,omitempty"` + // Specifies the leaf Protection Source Object such as a VM. + ProtectionSource struct { + ProtectionSource + } `json:"protectionSource,omitempty"` // Specifies the id of the RPO policy protecting this object. RpoPolicies []*ProtectionPolicy `json:"rpoPolicies"` @@ -129,17 +131,6 @@ func (m *ProtectionObjectSummary) validateProtectionSource(formats strfmt.Regist return nil } - if m.ProtectionSource != nil { - if err := m.ProtectionSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectionSource") - } - return err - } - } - return nil } @@ -243,22 +234,6 @@ func (m *ProtectionObjectSummary) contextValidateProtectionJobs(ctx context.Cont func (m *ProtectionObjectSummary) contextValidateProtectionSource(ctx context.Context, formats strfmt.Registry) error { - if m.ProtectionSource != nil { - - if swag.IsZero(m.ProtectionSource) { // not required - return nil - } - - if err := m.ProtectionSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectionSource") - } - return err - } - } - return nil } diff --git a/v1/models/protection_object_summary_protection_source.go b/v1/models/protection_object_summary_protection_source.go deleted file mode 100644 index 6654fb15..00000000 --- a/v1/models/protection_object_summary_protection_source.go +++ /dev/null @@ -1,93 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionObjectSummaryProtectionSource Specifies the leaf Protection Source Object such as a VM. -// -// swagger:model protectionObjectSummaryProtectionSource -type ProtectionObjectSummaryProtectionSource struct { - ProtectionSource -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ProtectionObjectSummaryProtectionSource) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 ProtectionSource - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.ProtectionSource = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ProtectionObjectSummaryProtectionSource) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.ProtectionSource) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this protection object summary protection source -func (m *ProtectionObjectSummaryProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ProtectionSource - if err := m.ProtectionSource.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this protection object summary protection source based on the context it is used -func (m *ProtectionObjectSummaryProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ProtectionSource - if err := m.ProtectionSource.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionObjectSummaryProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionObjectSummaryProtectionSource) UnmarshalBinary(b []byte) error { - var res ProtectionObjectSummaryProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_policy.go b/v1/models/protection_policy.go index a67a8ad4..09a3c092 100644 --- a/v1/models/protection_policy.go +++ b/v1/models/protection_policy.go @@ -53,6 +53,12 @@ type ProtectionPolicy struct { // deleted. DatalockConfig *DataLockConfig `json:"datalockConfig,omitempty"` + // Specifies WORM retention type for the CDP snapshots. When a WORM retention + // type is specified, the snapshots of the Protection Groups using this + // policy will be kept for the last N days as specified in the duration of + // the datalock. During that time, the snapshots cannot be deleted. + DatalockConfigCdp *DataLockConfig `json:"datalockConfigCdp,omitempty"` + // Specifies WORM retention type for the log snapshots. When a WORM retention // type is specified, the snapshots of the Protection Groups using this // policy will be kept for the last N days as specified in the duration of @@ -83,14 +89,26 @@ type ProtectionPolicy struct { // the maximum of all retention policies that are applicable to it. ExtendedRetentionPolicies []*ExtendedRetentionPolicy `json:"extendedRetentionPolicies"` - // full scheduling policy - FullSchedulingPolicy *ProtectionPolicyFullSchedulingPolicy `json:"fullSchedulingPolicy,omitempty"` + // Full (no CBT) Job Policy. + // + // Specifies the Full (no CBT) backup schedule of a Protection Job and + // how long Snapshots captured by this schedule are retained on the + // Cohesity Cluster. + FullSchedulingPolicy struct { + SchedulingPolicy + } `json:"fullSchedulingPolicy,omitempty"` // Specifies a unique Policy id assigned by the Cohesity Cluster. ID *string `json:"id,omitempty"` - // incremental scheduling policy - IncrementalSchedulingPolicy *ProtectionPolicyIncrementalSchedulingPolicy `json:"incrementalSchedulingPolicy,omitempty"` + // CBT-based Job Policy. + // + // Specifies the CBT-based backup schedule of a Protection Job and + // how long Snapshots captured by this schedule are + // retained on the Cohesity Cluster. + IncrementalSchedulingPolicy struct { + SchedulingPolicy + } `json:"incrementalSchedulingPolicy,omitempty"` // Specifies if the policy is associated with cascaded replication. IsCascadedReplicationPolicy *bool `json:"isCascadedReplicationPolicy,omitempty"` @@ -227,6 +245,10 @@ func (m *ProtectionPolicy) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateDatalockConfigCdp(formats); err != nil { + res = append(res, err) + } + if err := m.validateDatalockConfigLog(formats); err != nil { res = append(res, err) } @@ -401,6 +423,25 @@ func (m *ProtectionPolicy) validateDatalockConfig(formats strfmt.Registry) error return nil } +func (m *ProtectionPolicy) validateDatalockConfigCdp(formats strfmt.Registry) error { + if swag.IsZero(m.DatalockConfigCdp) { // not required + return nil + } + + if m.DatalockConfigCdp != nil { + if err := m.DatalockConfigCdp.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("datalockConfigCdp") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("datalockConfigCdp") + } + return err + } + } + + return nil +} + func (m *ProtectionPolicy) validateDatalockConfigLog(formats strfmt.Registry) error { if swag.IsZero(m.DatalockConfigLog) { // not required return nil @@ -470,17 +511,6 @@ func (m *ProtectionPolicy) validateFullSchedulingPolicy(formats strfmt.Registry) return nil } - if m.FullSchedulingPolicy != nil { - if err := m.FullSchedulingPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fullSchedulingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fullSchedulingPolicy") - } - return err - } - } - return nil } @@ -489,17 +519,6 @@ func (m *ProtectionPolicy) validateIncrementalSchedulingPolicy(formats strfmt.Re return nil } - if m.IncrementalSchedulingPolicy != nil { - if err := m.IncrementalSchedulingPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("incrementalSchedulingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("incrementalSchedulingPolicy") - } - return err - } - } - return nil } @@ -742,6 +761,10 @@ func (m *ProtectionPolicy) ContextValidate(ctx context.Context, formats strfmt.R res = append(res, err) } + if err := m.contextValidateDatalockConfigCdp(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateDatalockConfigLog(ctx, formats); err != nil { res = append(res, err) } @@ -909,6 +932,27 @@ func (m *ProtectionPolicy) contextValidateDatalockConfig(ctx context.Context, fo return nil } +func (m *ProtectionPolicy) contextValidateDatalockConfigCdp(ctx context.Context, formats strfmt.Registry) error { + + if m.DatalockConfigCdp != nil { + + if swag.IsZero(m.DatalockConfigCdp) { // not required + return nil + } + + if err := m.DatalockConfigCdp.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("datalockConfigCdp") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("datalockConfigCdp") + } + return err + } + } + + return nil +} + func (m *ProtectionPolicy) contextValidateDatalockConfigLog(ctx context.Context, formats strfmt.Registry) error { if m.DatalockConfigLog != nil { @@ -978,43 +1022,11 @@ func (m *ProtectionPolicy) contextValidateExtendedRetentionPolicies(ctx context. func (m *ProtectionPolicy) contextValidateFullSchedulingPolicy(ctx context.Context, formats strfmt.Registry) error { - if m.FullSchedulingPolicy != nil { - - if swag.IsZero(m.FullSchedulingPolicy) { // not required - return nil - } - - if err := m.FullSchedulingPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fullSchedulingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fullSchedulingPolicy") - } - return err - } - } - return nil } func (m *ProtectionPolicy) contextValidateIncrementalSchedulingPolicy(ctx context.Context, formats strfmt.Registry) error { - if m.IncrementalSchedulingPolicy != nil { - - if swag.IsZero(m.IncrementalSchedulingPolicy) { // not required - return nil - } - - if err := m.IncrementalSchedulingPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("incrementalSchedulingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("incrementalSchedulingPolicy") - } - return err - } - } - return nil } diff --git a/v1/models/protection_policy_full_scheduling_policy.go b/v1/models/protection_policy_full_scheduling_policy.go deleted file mode 100644 index 49f21d54..00000000 --- a/v1/models/protection_policy_full_scheduling_policy.go +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionPolicyFullSchedulingPolicy Full (no CBT) Job Policy. -// -// Specifies the Full (no CBT) backup schedule of a Protection Job and -// how long Snapshots captured by this schedule are retained on the -// Cohesity Cluster. -// -// swagger:model protectionPolicyFullSchedulingPolicy -type ProtectionPolicyFullSchedulingPolicy struct { - SchedulingPolicy -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ProtectionPolicyFullSchedulingPolicy) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 SchedulingPolicy - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.SchedulingPolicy = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ProtectionPolicyFullSchedulingPolicy) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.SchedulingPolicy) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this protection policy full scheduling policy -func (m *ProtectionPolicyFullSchedulingPolicy) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with SchedulingPolicy - if err := m.SchedulingPolicy.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this protection policy full scheduling policy based on the context it is used -func (m *ProtectionPolicyFullSchedulingPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with SchedulingPolicy - if err := m.SchedulingPolicy.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionPolicyFullSchedulingPolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionPolicyFullSchedulingPolicy) UnmarshalBinary(b []byte) error { - var res ProtectionPolicyFullSchedulingPolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_policy_incremental_scheduling_policy.go b/v1/models/protection_policy_incremental_scheduling_policy.go deleted file mode 100644 index f81bb001..00000000 --- a/v1/models/protection_policy_incremental_scheduling_policy.go +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionPolicyIncrementalSchedulingPolicy CBT-based Job Policy. -// -// Specifies the CBT-based backup schedule of a Protection Job and -// how long Snapshots captured by this schedule are -// retained on the Cohesity Cluster. -// -// swagger:model protectionPolicyIncrementalSchedulingPolicy -type ProtectionPolicyIncrementalSchedulingPolicy struct { - SchedulingPolicy -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ProtectionPolicyIncrementalSchedulingPolicy) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 SchedulingPolicy - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.SchedulingPolicy = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ProtectionPolicyIncrementalSchedulingPolicy) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.SchedulingPolicy) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this protection policy incremental scheduling policy -func (m *ProtectionPolicyIncrementalSchedulingPolicy) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with SchedulingPolicy - if err := m.SchedulingPolicy.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this protection policy incremental scheduling policy based on the context it is used -func (m *ProtectionPolicyIncrementalSchedulingPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with SchedulingPolicy - if err := m.SchedulingPolicy.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionPolicyIncrementalSchedulingPolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionPolicyIncrementalSchedulingPolicy) UnmarshalBinary(b []byte) error { - var res ProtectionPolicyIncrementalSchedulingPolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_policy_request.go b/v1/models/protection_policy_request.go index 53a1a214..b578684a 100644 --- a/v1/models/protection_policy_request.go +++ b/v1/models/protection_policy_request.go @@ -55,6 +55,12 @@ type ProtectionPolicyRequest struct { // deleted. DatalockConfig *DataLockConfig `json:"datalockConfig,omitempty"` + // Specifies WORM retention type for the CDP snapshots. When a WORM retention + // type is specified, the snapshots of the Protection Groups using this + // policy will be kept for the last N days as specified in the duration of + // the datalock. During that time, the snapshots cannot be deleted. + DatalockConfigCdp *DataLockConfig `json:"datalockConfigCdp,omitempty"` + // Specifies WORM retention type for the log snapshots. When a WORM retention // type is specified, the snapshots of the Protection Groups using this // policy will be kept for the last N days as specified in the duration of @@ -85,11 +91,23 @@ type ProtectionPolicyRequest struct { // the maximum of all retention policies that are applicable to it. ExtendedRetentionPolicies []*ExtendedRetentionPolicy `json:"extendedRetentionPolicies"` - // full scheduling policy - FullSchedulingPolicy *ProtectionPolicyRequestFullSchedulingPolicy `json:"fullSchedulingPolicy,omitempty"` + // Full (no CBT) Job Policy. + // + // Specifies the Full (no CBT) backup schedule of a Protection Job and + // how long Snapshots captured by this schedule are retained on the + // Cohesity Cluster. + FullSchedulingPolicy struct { + SchedulingPolicy + } `json:"fullSchedulingPolicy,omitempty"` - // incremental scheduling policy - IncrementalSchedulingPolicy *ProtectionPolicyRequestIncrementalSchedulingPolicy `json:"incrementalSchedulingPolicy,omitempty"` + // CBT-based Job Policy. + // + // Specifies the CBT-based backup schedule of a Protection Job and + // how long Snapshots captured by this schedule are + // retained on the Cohesity Cluster. + IncrementalSchedulingPolicy struct { + SchedulingPolicy + } `json:"incrementalSchedulingPolicy,omitempty"` // Log Job Policy. // @@ -206,6 +224,10 @@ func (m *ProtectionPolicyRequest) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateDatalockConfigCdp(formats); err != nil { + res = append(res, err) + } + if err := m.validateDatalockConfigLog(formats); err != nil { res = append(res, err) } @@ -380,6 +402,25 @@ func (m *ProtectionPolicyRequest) validateDatalockConfig(formats strfmt.Registry return nil } +func (m *ProtectionPolicyRequest) validateDatalockConfigCdp(formats strfmt.Registry) error { + if swag.IsZero(m.DatalockConfigCdp) { // not required + return nil + } + + if m.DatalockConfigCdp != nil { + if err := m.DatalockConfigCdp.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("datalockConfigCdp") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("datalockConfigCdp") + } + return err + } + } + + return nil +} + func (m *ProtectionPolicyRequest) validateDatalockConfigLog(formats strfmt.Registry) error { if swag.IsZero(m.DatalockConfigLog) { // not required return nil @@ -449,17 +490,6 @@ func (m *ProtectionPolicyRequest) validateFullSchedulingPolicy(formats strfmt.Re return nil } - if m.FullSchedulingPolicy != nil { - if err := m.FullSchedulingPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fullSchedulingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fullSchedulingPolicy") - } - return err - } - } - return nil } @@ -468,17 +498,6 @@ func (m *ProtectionPolicyRequest) validateIncrementalSchedulingPolicy(formats st return nil } - if m.IncrementalSchedulingPolicy != nil { - if err := m.IncrementalSchedulingPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("incrementalSchedulingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("incrementalSchedulingPolicy") - } - return err - } - } - return nil } @@ -721,6 +740,10 @@ func (m *ProtectionPolicyRequest) ContextValidate(ctx context.Context, formats s res = append(res, err) } + if err := m.contextValidateDatalockConfigCdp(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateDatalockConfigLog(ctx, formats); err != nil { res = append(res, err) } @@ -888,6 +911,27 @@ func (m *ProtectionPolicyRequest) contextValidateDatalockConfig(ctx context.Cont return nil } +func (m *ProtectionPolicyRequest) contextValidateDatalockConfigCdp(ctx context.Context, formats strfmt.Registry) error { + + if m.DatalockConfigCdp != nil { + + if swag.IsZero(m.DatalockConfigCdp) { // not required + return nil + } + + if err := m.DatalockConfigCdp.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("datalockConfigCdp") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("datalockConfigCdp") + } + return err + } + } + + return nil +} + func (m *ProtectionPolicyRequest) contextValidateDatalockConfigLog(ctx context.Context, formats strfmt.Registry) error { if m.DatalockConfigLog != nil { @@ -957,43 +1001,11 @@ func (m *ProtectionPolicyRequest) contextValidateExtendedRetentionPolicies(ctx c func (m *ProtectionPolicyRequest) contextValidateFullSchedulingPolicy(ctx context.Context, formats strfmt.Registry) error { - if m.FullSchedulingPolicy != nil { - - if swag.IsZero(m.FullSchedulingPolicy) { // not required - return nil - } - - if err := m.FullSchedulingPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fullSchedulingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fullSchedulingPolicy") - } - return err - } - } - return nil } func (m *ProtectionPolicyRequest) contextValidateIncrementalSchedulingPolicy(ctx context.Context, formats strfmt.Registry) error { - if m.IncrementalSchedulingPolicy != nil { - - if swag.IsZero(m.IncrementalSchedulingPolicy) { // not required - return nil - } - - if err := m.IncrementalSchedulingPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("incrementalSchedulingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("incrementalSchedulingPolicy") - } - return err - } - } - return nil } diff --git a/v1/models/protection_policy_request_full_scheduling_policy.go b/v1/models/protection_policy_request_full_scheduling_policy.go deleted file mode 100644 index 55545607..00000000 --- a/v1/models/protection_policy_request_full_scheduling_policy.go +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionPolicyRequestFullSchedulingPolicy Full (no CBT) Job Policy. -// -// Specifies the Full (no CBT) backup schedule of a Protection Job and -// how long Snapshots captured by this schedule are retained on the -// Cohesity Cluster. -// -// swagger:model protectionPolicyRequestFullSchedulingPolicy -type ProtectionPolicyRequestFullSchedulingPolicy struct { - SchedulingPolicy -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ProtectionPolicyRequestFullSchedulingPolicy) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 SchedulingPolicy - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.SchedulingPolicy = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ProtectionPolicyRequestFullSchedulingPolicy) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.SchedulingPolicy) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this protection policy request full scheduling policy -func (m *ProtectionPolicyRequestFullSchedulingPolicy) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with SchedulingPolicy - if err := m.SchedulingPolicy.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this protection policy request full scheduling policy based on the context it is used -func (m *ProtectionPolicyRequestFullSchedulingPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with SchedulingPolicy - if err := m.SchedulingPolicy.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionPolicyRequestFullSchedulingPolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionPolicyRequestFullSchedulingPolicy) UnmarshalBinary(b []byte) error { - var res ProtectionPolicyRequestFullSchedulingPolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_policy_request_incremental_scheduling_policy.go b/v1/models/protection_policy_request_incremental_scheduling_policy.go deleted file mode 100644 index d5750997..00000000 --- a/v1/models/protection_policy_request_incremental_scheduling_policy.go +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionPolicyRequestIncrementalSchedulingPolicy CBT-based Job Policy. -// -// Specifies the CBT-based backup schedule of a Protection Job and -// how long Snapshots captured by this schedule are -// retained on the Cohesity Cluster. -// -// swagger:model protectionPolicyRequestIncrementalSchedulingPolicy -type ProtectionPolicyRequestIncrementalSchedulingPolicy struct { - SchedulingPolicy -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ProtectionPolicyRequestIncrementalSchedulingPolicy) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 SchedulingPolicy - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.SchedulingPolicy = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ProtectionPolicyRequestIncrementalSchedulingPolicy) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.SchedulingPolicy) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this protection policy request incremental scheduling policy -func (m *ProtectionPolicyRequestIncrementalSchedulingPolicy) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with SchedulingPolicy - if err := m.SchedulingPolicy.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this protection policy request incremental scheduling policy based on the context it is used -func (m *ProtectionPolicyRequestIncrementalSchedulingPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with SchedulingPolicy - if err := m.SchedulingPolicy.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionPolicyRequestIncrementalSchedulingPolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionPolicyRequestIncrementalSchedulingPolicy) UnmarshalBinary(b []byte) error { - var res ProtectionPolicyRequestIncrementalSchedulingPolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_run_instance.go b/v1/models/protection_run_instance.go index 9caf17cb..eadbce70 100644 --- a/v1/models/protection_run_instance.go +++ b/v1/models/protection_run_instance.go @@ -39,8 +39,10 @@ type ProtectionRunInstance struct { // Specifies the name of the Protection Job name that was run. JobName *string `json:"jobName,omitempty"` - // job Uid - JobUID *ProtectionRunInstanceJobUID `json:"jobUid,omitempty"` + // Specifies the globally unique id of the Protection Job that was run. + JobUID struct { + UniversalID + } `json:"jobUid,omitempty"` // Specifies the shell information about the protection run. This // will only be populated if OnlyReturnShellInfo is sent as true. @@ -127,17 +129,6 @@ func (m *ProtectionRunInstance) validateJobUID(formats strfmt.Registry) error { return nil } - if m.JobUID != nil { - if err := m.JobUID.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("jobUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("jobUid") - } - return err - } - } - return nil } @@ -234,22 +225,6 @@ func (m *ProtectionRunInstance) contextValidateCopyRun(ctx context.Context, form func (m *ProtectionRunInstance) contextValidateJobUID(ctx context.Context, formats strfmt.Registry) error { - if m.JobUID != nil { - - if swag.IsZero(m.JobUID) { // not required - return nil - } - - if err := m.JobUID.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("jobUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("jobUid") - } - return err - } - } - return nil } diff --git a/v1/models/protection_run_instance_job_uid.go b/v1/models/protection_run_instance_job_uid.go deleted file mode 100644 index a8448527..00000000 --- a/v1/models/protection_run_instance_job_uid.go +++ /dev/null @@ -1,93 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionRunInstanceJobUID Specifies the globally unique id of the Protection Job that was run. -// -// swagger:model protectionRunInstanceJobUid -type ProtectionRunInstanceJobUID struct { - UniversalID -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ProtectionRunInstanceJobUID) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 UniversalID - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.UniversalID = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ProtectionRunInstanceJobUID) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.UniversalID) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this protection run instance job Uid -func (m *ProtectionRunInstanceJobUID) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UniversalID - if err := m.UniversalID.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this protection run instance job Uid based on the context it is used -func (m *ProtectionRunInstanceJobUID) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UniversalID - if err := m.UniversalID.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionRunInstanceJobUID) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionRunInstanceJobUID) UnmarshalBinary(b []byte) error { - var res ProtectionRunInstanceJobUID - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_source.go b/v1/models/protection_source.go index 4a5f8062..46418e85 100644 --- a/v1/models/protection_source.go +++ b/v1/models/protection_source.go @@ -24,20 +24,35 @@ import ( // swagger:model ProtectionSource type ProtectionSource struct { - // acropolis protection source - AcropolisProtectionSource *ProtectionSourceAcropolisProtectionSource `json:"acropolisProtectionSource,omitempty"` - - // ad protection source - AdProtectionSource *ProtectionSourceAdProtectionSource `json:"adProtectionSource,omitempty"` - - // aws protection source - AwsProtectionSource *ProtectionSourceAwsProtectionSource `json:"awsProtectionSource,omitempty"` - - // azure protection source - AzureProtectionSource *ProtectionSourceAzureProtectionSource `json:"azureProtectionSource,omitempty"` - - // cassandra protection source - CassandraProtectionSource *ProtectionSourceCassandraProtectionSource `json:"cassandraProtectionSource,omitempty"` + // Specifies details about an Acropolis Protection Source + // when the environment is set to 'kAcropolis'. + AcropolisProtectionSource struct { + AcropolisProtectionSource + } `json:"acropolisProtectionSource,omitempty"` + + // Specifies details about an AD Protection Source + // when the environment is set to 'kAD'. + AdProtectionSource struct { + AdProtectionSource + } `json:"adProtectionSource,omitempty"` + + // Specifies details about an AWS Protection Source + // when the environment is set to 'kAWS'. + AwsProtectionSource struct { + AwsProtectionSource + } `json:"awsProtectionSource,omitempty"` + + // Specifies details about an Azure Protection Source + // when the environment is set to 'kAzure'. + AzureProtectionSource struct { + AzureProtectionSource + } `json:"azureProtectionSource,omitempty"` + + // Specifies details about a Cassandra Protection Source + // when the environment is set to 'kCassandra'. + CassandraProtectionSource struct { + CassandraProtectionSource + } `json:"cassandraProtectionSource,omitempty"` // Specifies the connection id of the tenant. ConnectionID *int64 `json:"connectionId,omitempty"` @@ -45,14 +60,23 @@ type ProtectionSource struct { // Specifies the connector group id of the connector groups. ConnectorGroupID *int64 `json:"connectorGroupId,omitempty"` - // couchbase protection source - CouchbaseProtectionSource *ProtectionSourceCouchbaseProtectionSource `json:"couchbaseProtectionSource,omitempty"` + // Specifies details about a Couchbase Protection Source + // when the environment is set to 'kCouchbase'. + CouchbaseProtectionSource struct { + CouchbaseProtectionSource + } `json:"couchbaseProtectionSource,omitempty"` // Specifies the user provided custom name of the Protection Source. CustomName *string `json:"customName,omitempty"` - // elastifile protection source - ElastifileProtectionSource *ProtectionSourceElastifileProtectionSource `json:"elastifileProtectionSource,omitempty"` + // Specifies details about a Elastifile Protection Source + // when the environment is set to 'kElastifile'. + ElastifileProtectionSource struct { + ElastifileProtectionSource + } `json:"elastifileProtectionSource,omitempty"` + + // An ID generated by magneto to uniquely identify an entity. + EntityID *ObjectStringIdentifier `json:"entityId,omitempty"` // Specifies the environment (such as 'kVMware' or 'kSQL') where the // Protection Source exists. Depending on the environment, one of the @@ -113,92 +137,170 @@ type ProtectionSource struct { // Enum: ["kVMware","kHyperV","kSQL","kView","kPuppeteer","kPhysical","kPure","kNimble","kIbmFlashSystem","kAzure","kNetapp","kAgent","kGenericNas","kAcropolis","kPhysicalFiles","kIsilon","kGPFS","kKVM","kAWS","kExchange","kHyperVVSS","kOracle","kGCP","kFlashBlade","kAWSNative","kO365","kO365Outlook","kHyperFlex","kGCPNative","kAzureNative","kKubernetes","kElastifile","kAD","kRDSSnapshotManager","kCassandra","kMongoDB","kCouchbase","kHdfs","kHive","kHBase","kUDA","kO365Teams","kO365Group","kO365Exchange","kO365OneDrive","kO365Sharepoint","kO365PublicFolders"] Environment *string `json:"environment,omitempty"` - // exchange protection source - ExchangeProtectionSource *ProtectionSourceExchangeProtectionSource `json:"exchangeProtectionSource,omitempty"` - - // flash blade protection source - FlashBladeProtectionSource *ProtectionSourceFlashBladeProtectionSource `json:"flashBladeProtectionSource,omitempty"` - - // gcp protection source - GcpProtectionSource *ProtectionSourceGcpProtectionSource `json:"gcpProtectionSource,omitempty"` - - // gpfs protection source - GpfsProtectionSource *ProtectionSourceGpfsProtectionSource `json:"gpfsProtectionSource,omitempty"` - - // hbase protection source - HbaseProtectionSource *ProtectionSourceHbaseProtectionSource `json:"hbaseProtectionSource,omitempty"` - - // hdfs protection source - HdfsProtectionSource *ProtectionSourceHdfsProtectionSource `json:"hdfsProtectionSource,omitempty"` - - // hive protection source - HiveProtectionSource *ProtectionSourceHiveProtectionSource `json:"hiveProtectionSource,omitempty"` - - // hyper flex protection source - HyperFlexProtectionSource *ProtectionSourceHyperFlexProtectionSource `json:"hyperFlexProtectionSource,omitempty"` - - // hyperv protection source - HypervProtectionSource *ProtectionSourceHypervProtectionSource `json:"hypervProtectionSource,omitempty"` - - // ibm flash system protection source - IbmFlashSystemProtectionSource *ProtectionSourceIbmFlashSystemProtectionSource `json:"ibmFlashSystemProtectionSource,omitempty"` + // Specifies details about an Exchange Protection Source + // when the environment is set to 'kExchange'. + ExchangeProtectionSource struct { + ExchangeProtectionSource + } `json:"exchangeProtectionSource,omitempty"` + + // Specifies details about a Pure Storage FlashBlade Protection Source + // when the environment is set to 'kFlashBlade'. + FlashBladeProtectionSource struct { + FlashBladeProtectionSource + } `json:"flashBladeProtectionSource,omitempty"` + + // Specifies details about an GCP Protection Source + // when the environment is set to 'kGCP'. + GcpProtectionSource struct { + GcpProtectionSource + } `json:"gcpProtectionSource,omitempty"` + + // Specifies details about an GPFS Protection Source + // when the environment is set to 'kGPFS'. + GpfsProtectionSource struct { + GpfsProtectionSource + } `json:"gpfsProtectionSource,omitempty"` + + // Specifies details about a HBase Protection Source + // when the environment is set to 'kHBase'. + HbaseProtectionSource struct { + HBaseProtectionSource + } `json:"hbaseProtectionSource,omitempty"` + + // Specifies details about a Hdfs Protection Source + // when the environment is set to 'kHdfs'. + HdfsProtectionSource struct { + HdfsProtectionSource + } `json:"hdfsProtectionSource,omitempty"` + + // Specifies details about a Hive Protection Source + // when the environment is set to 'kHive'. + HiveProtectionSource struct { + HiveProtectionSource + } `json:"hiveProtectionSource,omitempty"` + + // Specifies details about a HyperFlex Storage Snapshot source + // when the environment is set to 'kHyperFlex' + HyperFlexProtectionSource struct { + HyperFlexProtectionSource + } `json:"hyperFlexProtectionSource,omitempty"` + + // Specifies details about a HyperV Protection Source + // when the environment is set to 'kHyperV'. + HypervProtectionSource struct { + HypervProtectionSource + } `json:"hypervProtectionSource,omitempty"` + + // Specifies details about an Ibm Flash System Protection Source + // when the environment is set to 'kIbmFlashSystem'. + IbmFlashSystemProtectionSource struct { + IbmFlashSystemProtectionSource + } `json:"ibmFlashSystemProtectionSource,omitempty"` // Specifies an id of the Protection Source. ID *int64 `json:"id,omitempty"` - // isilon protection source - IsilonProtectionSource *ProtectionSourceIsilonProtectionSource `json:"isilonProtectionSource,omitempty"` - - // kubernetes protection source - KubernetesProtectionSource *ProtectionSourceKubernetesProtectionSource `json:"kubernetesProtectionSource,omitempty"` - - // kvm protection source - KvmProtectionSource *ProtectionSourceKvmProtectionSource `json:"kvmProtectionSource,omitempty"` - - // mongodb protection source - MongodbProtectionSource *ProtectionSourceMongodbProtectionSource `json:"mongodbProtectionSource,omitempty"` + // Specifies details about an Isilon OneFs Protection Source + // when the environment is set to 'kIsilon'. + IsilonProtectionSource struct { + IsilonProtectionSource + } `json:"isilonProtectionSource,omitempty"` + + // Specifies details about a Kubernetes Protection Source + // when the environment is set to 'kKubernetes'. + KubernetesProtectionSource struct { + KubernetesProtectionSource + } `json:"kubernetesProtectionSource,omitempty"` + + // Specifies details about a KVM Protection Source + // when the environment is set to 'kKVM'. + KvmProtectionSource struct { + KvmProtectionSource + } `json:"kvmProtectionSource,omitempty"` + + // Specifies details about a MongoDB Protection Source + // when the environment is set to 'kMongoDB'. + MongodbProtectionSource struct { + MongoDBProtectionSource + } `json:"mongodbProtectionSource,omitempty"` // Specifies a name of the Protection Source. Name *string `json:"name,omitempty"` - // nas protection source - NasProtectionSource *ProtectionSourceNasProtectionSource `json:"nasProtectionSource,omitempty"` - - // netapp protection source - NetappProtectionSource *ProtectionSourceNetappProtectionSource `json:"netappProtectionSource,omitempty"` - - // nimble protection source - NimbleProtectionSource *ProtectionSourceNimbleProtectionSource `json:"nimbleProtectionSource,omitempty"` - - // office365 protection source - Office365ProtectionSource *ProtectionSourceOffice365ProtectionSource `json:"office365ProtectionSource,omitempty"` - - // oracle protection source - OracleProtectionSource *ProtectionSourceOracleProtectionSource `json:"oracleProtectionSource,omitempty"` + // Specifies details about a Generic NAS Protection Source + // when the environment is set to 'kGenericNas'. + NasProtectionSource struct { + NasProtectionSource + } `json:"nasProtectionSource,omitempty"` + + // Specifies details about a NetApp Protection Source + // when the environment is set to 'kNetapp'. + NetappProtectionSource struct { + NetappProtectionSource + } `json:"netappProtectionSource,omitempty"` + + // Specifies details about a SAN Protection Source + // when the environment is set to 'kNimble'. + NimbleProtectionSource struct { + NimbleProtectionSource + } `json:"nimbleProtectionSource,omitempty"` + + // Specifies details about an Office 365 Protection Source + // when the environment is set to 'kO365'. + Office365ProtectionSource struct { + Office365ProtectionSource + } `json:"office365ProtectionSource,omitempty"` + + // Specifies details about an Oracle Protection Source + // when the environment is set to 'kOracle'. + OracleProtectionSource struct { + OracleProtectionSource + } `json:"oracleProtectionSource,omitempty"` // Specifies an id of the parent of the Protection Source. ParentID *int64 `json:"parentId,omitempty"` - // physical protection source - PhysicalProtectionSource *ProtectionSourcePhysicalProtectionSource `json:"physicalProtectionSource,omitempty"` - - // pure protection source - PureProtectionSource *ProtectionSourcePureProtectionSource `json:"pureProtectionSource,omitempty"` - - // sfdc protection source - SfdcProtectionSource *ProtectionSourceSfdcProtectionSource `json:"sfdcProtectionSource,omitempty"` - - // sql protection source - SQLProtectionSource *ProtectionSourceSQLProtectionSource `json:"sqlProtectionSource,omitempty"` - - // uda protection source - UdaProtectionSource *ProtectionSourceUdaProtectionSource `json:"udaProtectionSource,omitempty"` - - // view protection source - ViewProtectionSource *ProtectionSourceViewProtectionSource `json:"viewProtectionSource,omitempty"` - - // vm ware protection source - VMWareProtectionSource *ProtectionSourceVMWareProtectionSource `json:"vmWareProtectionSource,omitempty"` + // Specifies details about a Physical Protection Source + // when the environment is set to 'kPhysical'. + PhysicalProtectionSource struct { + PhysicalProtectionSource + } `json:"physicalProtectionSource,omitempty"` + + // Specifies details about a Pure Protection Source + // when the environment is set to 'kPure'. + PureProtectionSource struct { + PureProtectionSource + } `json:"pureProtectionSource,omitempty"` + + // Specifies details about a Salesforce Protection Source + // when the environment is set to 'kSfdc'. + SfdcProtectionSource struct { + SfdcProtectionSource + } `json:"sfdcProtectionSource,omitempty"` + + // Specifies details about a SQL Protection Source + // when the environment is set to 'kSQL'. + SQLProtectionSource struct { + SQLProtectionSource + } `json:"sqlProtectionSource,omitempty"` + + // Specifies details about a Universal Data Adapter Protection Source + // when the environment is set to 'kUDA'. + UdaProtectionSource struct { + UdaProtectionSource + } `json:"udaProtectionSource,omitempty"` + + // Specifies details about a View Protection Source + // when the environment is set to 'kView'. + ViewProtectionSource struct { + ViewProtectionSource + } `json:"viewProtectionSource,omitempty"` + + // Specifies details about a VMware Protection Source + // when the environment is set to 'kVMware'. + VMWareProtectionSource struct { + VMwareProtectionSource + } `json:"vmWareProtectionSource,omitempty"` } // Validate validates this protection source @@ -233,6 +335,10 @@ func (m *ProtectionSource) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateEntityID(formats); err != nil { + res = append(res, err) + } + if err := m.validateEnvironment(formats); err != nil { res = append(res, err) } @@ -352,17 +458,6 @@ func (m *ProtectionSource) validateAcropolisProtectionSource(formats strfmt.Regi return nil } - if m.AcropolisProtectionSource != nil { - if err := m.AcropolisProtectionSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("acropolisProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("acropolisProtectionSource") - } - return err - } - } - return nil } @@ -371,17 +466,6 @@ func (m *ProtectionSource) validateAdProtectionSource(formats strfmt.Registry) e return nil } - if m.AdProtectionSource != nil { - if err := m.AdProtectionSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("adProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("adProtectionSource") - } - return err - } - } - return nil } @@ -390,17 +474,6 @@ func (m *ProtectionSource) validateAwsProtectionSource(formats strfmt.Registry) return nil } - if m.AwsProtectionSource != nil { - if err := m.AwsProtectionSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsProtectionSource") - } - return err - } - } - return nil } @@ -409,17 +482,6 @@ func (m *ProtectionSource) validateAzureProtectionSource(formats strfmt.Registry return nil } - if m.AzureProtectionSource != nil { - if err := m.AzureProtectionSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureProtectionSource") - } - return err - } - } - return nil } @@ -428,17 +490,6 @@ func (m *ProtectionSource) validateCassandraProtectionSource(formats strfmt.Regi return nil } - if m.CassandraProtectionSource != nil { - if err := m.CassandraProtectionSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraProtectionSource") - } - return err - } - } - return nil } @@ -447,17 +498,6 @@ func (m *ProtectionSource) validateCouchbaseProtectionSource(formats strfmt.Regi return nil } - if m.CouchbaseProtectionSource != nil { - if err := m.CouchbaseProtectionSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("couchbaseProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("couchbaseProtectionSource") - } - return err - } - } - return nil } @@ -466,12 +506,20 @@ func (m *ProtectionSource) validateElastifileProtectionSource(formats strfmt.Reg return nil } - if m.ElastifileProtectionSource != nil { - if err := m.ElastifileProtectionSource.Validate(formats); err != nil { + return nil +} + +func (m *ProtectionSource) validateEntityID(formats strfmt.Registry) error { + if swag.IsZero(m.EntityID) { // not required + return nil + } + + if m.EntityID != nil { + if err := m.EntityID.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("elastifileProtectionSource") + return ve.ValidateName("entityId") } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("elastifileProtectionSource") + return ce.ValidateName("entityId") } return err } @@ -662,17 +710,6 @@ func (m *ProtectionSource) validateExchangeProtectionSource(formats strfmt.Regis return nil } - if m.ExchangeProtectionSource != nil { - if err := m.ExchangeProtectionSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("exchangeProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("exchangeProtectionSource") - } - return err - } - } - return nil } @@ -681,17 +718,6 @@ func (m *ProtectionSource) validateFlashBladeProtectionSource(formats strfmt.Reg return nil } - if m.FlashBladeProtectionSource != nil { - if err := m.FlashBladeProtectionSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("flashBladeProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("flashBladeProtectionSource") - } - return err - } - } - return nil } @@ -700,17 +726,6 @@ func (m *ProtectionSource) validateGcpProtectionSource(formats strfmt.Registry) return nil } - if m.GcpProtectionSource != nil { - if err := m.GcpProtectionSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gcpProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gcpProtectionSource") - } - return err - } - } - return nil } @@ -719,17 +734,6 @@ func (m *ProtectionSource) validateGpfsProtectionSource(formats strfmt.Registry) return nil } - if m.GpfsProtectionSource != nil { - if err := m.GpfsProtectionSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gpfsProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gpfsProtectionSource") - } - return err - } - } - return nil } @@ -738,17 +742,6 @@ func (m *ProtectionSource) validateHbaseProtectionSource(formats strfmt.Registry return nil } - if m.HbaseProtectionSource != nil { - if err := m.HbaseProtectionSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hbaseProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hbaseProtectionSource") - } - return err - } - } - return nil } @@ -757,17 +750,6 @@ func (m *ProtectionSource) validateHdfsProtectionSource(formats strfmt.Registry) return nil } - if m.HdfsProtectionSource != nil { - if err := m.HdfsProtectionSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hdfsProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hdfsProtectionSource") - } - return err - } - } - return nil } @@ -776,17 +758,6 @@ func (m *ProtectionSource) validateHiveProtectionSource(formats strfmt.Registry) return nil } - if m.HiveProtectionSource != nil { - if err := m.HiveProtectionSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hiveProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hiveProtectionSource") - } - return err - } - } - return nil } @@ -795,17 +766,6 @@ func (m *ProtectionSource) validateHyperFlexProtectionSource(formats strfmt.Regi return nil } - if m.HyperFlexProtectionSource != nil { - if err := m.HyperFlexProtectionSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hyperFlexProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hyperFlexProtectionSource") - } - return err - } - } - return nil } @@ -814,17 +774,6 @@ func (m *ProtectionSource) validateHypervProtectionSource(formats strfmt.Registr return nil } - if m.HypervProtectionSource != nil { - if err := m.HypervProtectionSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hypervProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hypervProtectionSource") - } - return err - } - } - return nil } @@ -833,17 +782,6 @@ func (m *ProtectionSource) validateIbmFlashSystemProtectionSource(formats strfmt return nil } - if m.IbmFlashSystemProtectionSource != nil { - if err := m.IbmFlashSystemProtectionSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ibmFlashSystemProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ibmFlashSystemProtectionSource") - } - return err - } - } - return nil } @@ -852,17 +790,6 @@ func (m *ProtectionSource) validateIsilonProtectionSource(formats strfmt.Registr return nil } - if m.IsilonProtectionSource != nil { - if err := m.IsilonProtectionSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("isilonProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("isilonProtectionSource") - } - return err - } - } - return nil } @@ -871,17 +798,6 @@ func (m *ProtectionSource) validateKubernetesProtectionSource(formats strfmt.Reg return nil } - if m.KubernetesProtectionSource != nil { - if err := m.KubernetesProtectionSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("kubernetesProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("kubernetesProtectionSource") - } - return err - } - } - return nil } @@ -890,17 +806,6 @@ func (m *ProtectionSource) validateKvmProtectionSource(formats strfmt.Registry) return nil } - if m.KvmProtectionSource != nil { - if err := m.KvmProtectionSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("kvmProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("kvmProtectionSource") - } - return err - } - } - return nil } @@ -909,17 +814,6 @@ func (m *ProtectionSource) validateMongodbProtectionSource(formats strfmt.Regist return nil } - if m.MongodbProtectionSource != nil { - if err := m.MongodbProtectionSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mongodbProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mongodbProtectionSource") - } - return err - } - } - return nil } @@ -928,17 +822,6 @@ func (m *ProtectionSource) validateNasProtectionSource(formats strfmt.Registry) return nil } - if m.NasProtectionSource != nil { - if err := m.NasProtectionSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nasProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nasProtectionSource") - } - return err - } - } - return nil } @@ -947,17 +830,6 @@ func (m *ProtectionSource) validateNetappProtectionSource(formats strfmt.Registr return nil } - if m.NetappProtectionSource != nil { - if err := m.NetappProtectionSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("netappProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("netappProtectionSource") - } - return err - } - } - return nil } @@ -966,17 +838,6 @@ func (m *ProtectionSource) validateNimbleProtectionSource(formats strfmt.Registr return nil } - if m.NimbleProtectionSource != nil { - if err := m.NimbleProtectionSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nimbleProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nimbleProtectionSource") - } - return err - } - } - return nil } @@ -985,17 +846,6 @@ func (m *ProtectionSource) validateOffice365ProtectionSource(formats strfmt.Regi return nil } - if m.Office365ProtectionSource != nil { - if err := m.Office365ProtectionSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("office365ProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("office365ProtectionSource") - } - return err - } - } - return nil } @@ -1004,17 +854,6 @@ func (m *ProtectionSource) validateOracleProtectionSource(formats strfmt.Registr return nil } - if m.OracleProtectionSource != nil { - if err := m.OracleProtectionSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleProtectionSource") - } - return err - } - } - return nil } @@ -1023,17 +862,6 @@ func (m *ProtectionSource) validatePhysicalProtectionSource(formats strfmt.Regis return nil } - if m.PhysicalProtectionSource != nil { - if err := m.PhysicalProtectionSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("physicalProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("physicalProtectionSource") - } - return err - } - } - return nil } @@ -1042,17 +870,6 @@ func (m *ProtectionSource) validatePureProtectionSource(formats strfmt.Registry) return nil } - if m.PureProtectionSource != nil { - if err := m.PureProtectionSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("pureProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("pureProtectionSource") - } - return err - } - } - return nil } @@ -1061,17 +878,6 @@ func (m *ProtectionSource) validateSfdcProtectionSource(formats strfmt.Registry) return nil } - if m.SfdcProtectionSource != nil { - if err := m.SfdcProtectionSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sfdcProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sfdcProtectionSource") - } - return err - } - } - return nil } @@ -1080,17 +886,6 @@ func (m *ProtectionSource) validateSQLProtectionSource(formats strfmt.Registry) return nil } - if m.SQLProtectionSource != nil { - if err := m.SQLProtectionSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sqlProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sqlProtectionSource") - } - return err - } - } - return nil } @@ -1099,17 +894,6 @@ func (m *ProtectionSource) validateUdaProtectionSource(formats strfmt.Registry) return nil } - if m.UdaProtectionSource != nil { - if err := m.UdaProtectionSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("udaProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("udaProtectionSource") - } - return err - } - } - return nil } @@ -1118,17 +902,6 @@ func (m *ProtectionSource) validateViewProtectionSource(formats strfmt.Registry) return nil } - if m.ViewProtectionSource != nil { - if err := m.ViewProtectionSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewProtectionSource") - } - return err - } - } - return nil } @@ -1137,17 +910,6 @@ func (m *ProtectionSource) validateVMWareProtectionSource(formats strfmt.Registr return nil } - if m.VMWareProtectionSource != nil { - if err := m.VMWareProtectionSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmWareProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmWareProtectionSource") - } - return err - } - } - return nil } @@ -1183,6 +945,10 @@ func (m *ProtectionSource) ContextValidate(ctx context.Context, formats strfmt.R res = append(res, err) } + if err := m.contextValidateEntityID(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateExchangeProtectionSource(ctx, formats); err != nil { res = append(res, err) } @@ -1295,143 +1061,52 @@ func (m *ProtectionSource) ContextValidate(ctx context.Context, formats strfmt.R func (m *ProtectionSource) contextValidateAcropolisProtectionSource(ctx context.Context, formats strfmt.Registry) error { - if m.AcropolisProtectionSource != nil { - - if swag.IsZero(m.AcropolisProtectionSource) { // not required - return nil - } - - if err := m.AcropolisProtectionSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("acropolisProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("acropolisProtectionSource") - } - return err - } - } - return nil } func (m *ProtectionSource) contextValidateAdProtectionSource(ctx context.Context, formats strfmt.Registry) error { - if m.AdProtectionSource != nil { - - if swag.IsZero(m.AdProtectionSource) { // not required - return nil - } - - if err := m.AdProtectionSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("adProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("adProtectionSource") - } - return err - } - } - return nil } func (m *ProtectionSource) contextValidateAwsProtectionSource(ctx context.Context, formats strfmt.Registry) error { - if m.AwsProtectionSource != nil { - - if swag.IsZero(m.AwsProtectionSource) { // not required - return nil - } - - if err := m.AwsProtectionSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsProtectionSource") - } - return err - } - } - return nil } func (m *ProtectionSource) contextValidateAzureProtectionSource(ctx context.Context, formats strfmt.Registry) error { - if m.AzureProtectionSource != nil { - - if swag.IsZero(m.AzureProtectionSource) { // not required - return nil - } - - if err := m.AzureProtectionSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureProtectionSource") - } - return err - } - } - return nil } func (m *ProtectionSource) contextValidateCassandraProtectionSource(ctx context.Context, formats strfmt.Registry) error { - if m.CassandraProtectionSource != nil { - - if swag.IsZero(m.CassandraProtectionSource) { // not required - return nil - } - - if err := m.CassandraProtectionSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cassandraProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cassandraProtectionSource") - } - return err - } - } - return nil } func (m *ProtectionSource) contextValidateCouchbaseProtectionSource(ctx context.Context, formats strfmt.Registry) error { - if m.CouchbaseProtectionSource != nil { - - if swag.IsZero(m.CouchbaseProtectionSource) { // not required - return nil - } + return nil +} - if err := m.CouchbaseProtectionSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("couchbaseProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("couchbaseProtectionSource") - } - return err - } - } +func (m *ProtectionSource) contextValidateElastifileProtectionSource(ctx context.Context, formats strfmt.Registry) error { return nil } -func (m *ProtectionSource) contextValidateElastifileProtectionSource(ctx context.Context, formats strfmt.Registry) error { +func (m *ProtectionSource) contextValidateEntityID(ctx context.Context, formats strfmt.Registry) error { - if m.ElastifileProtectionSource != nil { + if m.EntityID != nil { - if swag.IsZero(m.ElastifileProtectionSource) { // not required + if swag.IsZero(m.EntityID) { // not required return nil } - if err := m.ElastifileProtectionSource.ContextValidate(ctx, formats); err != nil { + if err := m.EntityID.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("elastifileProtectionSource") + return ve.ValidateName("entityId") } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("elastifileProtectionSource") + return ce.ValidateName("entityId") } return err } @@ -1442,547 +1117,131 @@ func (m *ProtectionSource) contextValidateElastifileProtectionSource(ctx context func (m *ProtectionSource) contextValidateExchangeProtectionSource(ctx context.Context, formats strfmt.Registry) error { - if m.ExchangeProtectionSource != nil { - - if swag.IsZero(m.ExchangeProtectionSource) { // not required - return nil - } - - if err := m.ExchangeProtectionSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("exchangeProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("exchangeProtectionSource") - } - return err - } - } - return nil } func (m *ProtectionSource) contextValidateFlashBladeProtectionSource(ctx context.Context, formats strfmt.Registry) error { - if m.FlashBladeProtectionSource != nil { - - if swag.IsZero(m.FlashBladeProtectionSource) { // not required - return nil - } - - if err := m.FlashBladeProtectionSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("flashBladeProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("flashBladeProtectionSource") - } - return err - } - } - return nil } func (m *ProtectionSource) contextValidateGcpProtectionSource(ctx context.Context, formats strfmt.Registry) error { - if m.GcpProtectionSource != nil { - - if swag.IsZero(m.GcpProtectionSource) { // not required - return nil - } - - if err := m.GcpProtectionSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gcpProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gcpProtectionSource") - } - return err - } - } - return nil } func (m *ProtectionSource) contextValidateGpfsProtectionSource(ctx context.Context, formats strfmt.Registry) error { - if m.GpfsProtectionSource != nil { - - if swag.IsZero(m.GpfsProtectionSource) { // not required - return nil - } - - if err := m.GpfsProtectionSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gpfsProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gpfsProtectionSource") - } - return err - } - } - return nil } func (m *ProtectionSource) contextValidateHbaseProtectionSource(ctx context.Context, formats strfmt.Registry) error { - if m.HbaseProtectionSource != nil { - - if swag.IsZero(m.HbaseProtectionSource) { // not required - return nil - } - - if err := m.HbaseProtectionSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hbaseProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hbaseProtectionSource") - } - return err - } - } - return nil } func (m *ProtectionSource) contextValidateHdfsProtectionSource(ctx context.Context, formats strfmt.Registry) error { - if m.HdfsProtectionSource != nil { - - if swag.IsZero(m.HdfsProtectionSource) { // not required - return nil - } - - if err := m.HdfsProtectionSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hdfsProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hdfsProtectionSource") - } - return err - } - } - return nil } func (m *ProtectionSource) contextValidateHiveProtectionSource(ctx context.Context, formats strfmt.Registry) error { - if m.HiveProtectionSource != nil { - - if swag.IsZero(m.HiveProtectionSource) { // not required - return nil - } - - if err := m.HiveProtectionSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hiveProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hiveProtectionSource") - } - return err - } - } - return nil } func (m *ProtectionSource) contextValidateHyperFlexProtectionSource(ctx context.Context, formats strfmt.Registry) error { - if m.HyperFlexProtectionSource != nil { - - if swag.IsZero(m.HyperFlexProtectionSource) { // not required - return nil - } - - if err := m.HyperFlexProtectionSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hyperFlexProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hyperFlexProtectionSource") - } - return err - } - } - return nil } func (m *ProtectionSource) contextValidateHypervProtectionSource(ctx context.Context, formats strfmt.Registry) error { - if m.HypervProtectionSource != nil { - - if swag.IsZero(m.HypervProtectionSource) { // not required - return nil - } - - if err := m.HypervProtectionSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hypervProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hypervProtectionSource") - } - return err - } - } - return nil } func (m *ProtectionSource) contextValidateIbmFlashSystemProtectionSource(ctx context.Context, formats strfmt.Registry) error { - if m.IbmFlashSystemProtectionSource != nil { - - if swag.IsZero(m.IbmFlashSystemProtectionSource) { // not required - return nil - } - - if err := m.IbmFlashSystemProtectionSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ibmFlashSystemProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ibmFlashSystemProtectionSource") - } - return err - } - } - return nil } func (m *ProtectionSource) contextValidateIsilonProtectionSource(ctx context.Context, formats strfmt.Registry) error { - if m.IsilonProtectionSource != nil { - - if swag.IsZero(m.IsilonProtectionSource) { // not required - return nil - } - - if err := m.IsilonProtectionSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("isilonProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("isilonProtectionSource") - } - return err - } - } - return nil } func (m *ProtectionSource) contextValidateKubernetesProtectionSource(ctx context.Context, formats strfmt.Registry) error { - if m.KubernetesProtectionSource != nil { - - if swag.IsZero(m.KubernetesProtectionSource) { // not required - return nil - } - - if err := m.KubernetesProtectionSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("kubernetesProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("kubernetesProtectionSource") - } - return err - } - } - return nil } func (m *ProtectionSource) contextValidateKvmProtectionSource(ctx context.Context, formats strfmt.Registry) error { - if m.KvmProtectionSource != nil { - - if swag.IsZero(m.KvmProtectionSource) { // not required - return nil - } - - if err := m.KvmProtectionSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("kvmProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("kvmProtectionSource") - } - return err - } - } - return nil } func (m *ProtectionSource) contextValidateMongodbProtectionSource(ctx context.Context, formats strfmt.Registry) error { - if m.MongodbProtectionSource != nil { - - if swag.IsZero(m.MongodbProtectionSource) { // not required - return nil - } - - if err := m.MongodbProtectionSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mongodbProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("mongodbProtectionSource") - } - return err - } - } - return nil } func (m *ProtectionSource) contextValidateNasProtectionSource(ctx context.Context, formats strfmt.Registry) error { - if m.NasProtectionSource != nil { - - if swag.IsZero(m.NasProtectionSource) { // not required - return nil - } - - if err := m.NasProtectionSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nasProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nasProtectionSource") - } - return err - } - } - return nil } func (m *ProtectionSource) contextValidateNetappProtectionSource(ctx context.Context, formats strfmt.Registry) error { - if m.NetappProtectionSource != nil { - - if swag.IsZero(m.NetappProtectionSource) { // not required - return nil - } - - if err := m.NetappProtectionSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("netappProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("netappProtectionSource") - } - return err - } - } - return nil } func (m *ProtectionSource) contextValidateNimbleProtectionSource(ctx context.Context, formats strfmt.Registry) error { - if m.NimbleProtectionSource != nil { - - if swag.IsZero(m.NimbleProtectionSource) { // not required - return nil - } - - if err := m.NimbleProtectionSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nimbleProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nimbleProtectionSource") - } - return err - } - } - return nil } func (m *ProtectionSource) contextValidateOffice365ProtectionSource(ctx context.Context, formats strfmt.Registry) error { - if m.Office365ProtectionSource != nil { - - if swag.IsZero(m.Office365ProtectionSource) { // not required - return nil - } - - if err := m.Office365ProtectionSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("office365ProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("office365ProtectionSource") - } - return err - } - } - return nil } func (m *ProtectionSource) contextValidateOracleProtectionSource(ctx context.Context, formats strfmt.Registry) error { - if m.OracleProtectionSource != nil { - - if swag.IsZero(m.OracleProtectionSource) { // not required - return nil - } - - if err := m.OracleProtectionSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oracleProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oracleProtectionSource") - } - return err - } - } - return nil } func (m *ProtectionSource) contextValidatePhysicalProtectionSource(ctx context.Context, formats strfmt.Registry) error { - if m.PhysicalProtectionSource != nil { - - if swag.IsZero(m.PhysicalProtectionSource) { // not required - return nil - } - - if err := m.PhysicalProtectionSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("physicalProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("physicalProtectionSource") - } - return err - } - } - return nil } func (m *ProtectionSource) contextValidatePureProtectionSource(ctx context.Context, formats strfmt.Registry) error { - if m.PureProtectionSource != nil { - - if swag.IsZero(m.PureProtectionSource) { // not required - return nil - } - - if err := m.PureProtectionSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("pureProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("pureProtectionSource") - } - return err - } - } - return nil } func (m *ProtectionSource) contextValidateSfdcProtectionSource(ctx context.Context, formats strfmt.Registry) error { - if m.SfdcProtectionSource != nil { - - if swag.IsZero(m.SfdcProtectionSource) { // not required - return nil - } - - if err := m.SfdcProtectionSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sfdcProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sfdcProtectionSource") - } - return err - } - } - return nil } func (m *ProtectionSource) contextValidateSQLProtectionSource(ctx context.Context, formats strfmt.Registry) error { - if m.SQLProtectionSource != nil { - - if swag.IsZero(m.SQLProtectionSource) { // not required - return nil - } - - if err := m.SQLProtectionSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sqlProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sqlProtectionSource") - } - return err - } - } - return nil } func (m *ProtectionSource) contextValidateUdaProtectionSource(ctx context.Context, formats strfmt.Registry) error { - if m.UdaProtectionSource != nil { - - if swag.IsZero(m.UdaProtectionSource) { // not required - return nil - } - - if err := m.UdaProtectionSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("udaProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("udaProtectionSource") - } - return err - } - } - return nil } func (m *ProtectionSource) contextValidateViewProtectionSource(ctx context.Context, formats strfmt.Registry) error { - if m.ViewProtectionSource != nil { - - if swag.IsZero(m.ViewProtectionSource) { // not required - return nil - } - - if err := m.ViewProtectionSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("viewProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("viewProtectionSource") - } - return err - } - } - return nil } func (m *ProtectionSource) contextValidateVMWareProtectionSource(ctx context.Context, formats strfmt.Registry) error { - if m.VMWareProtectionSource != nil { - - if swag.IsZero(m.VMWareProtectionSource) { // not required - return nil - } - - if err := m.VMWareProtectionSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmWareProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmWareProtectionSource") - } - return err - } - } - return nil } diff --git a/v1/models/protection_source_acropolis_protection_source.go b/v1/models/protection_source_acropolis_protection_source.go deleted file mode 100644 index 4719d1e0..00000000 --- a/v1/models/protection_source_acropolis_protection_source.go +++ /dev/null @@ -1,94 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionSourceAcropolisProtectionSource Specifies details about an Acropolis Protection Source -// when the environment is set to 'kAcropolis'. -// -// swagger:model protectionSourceAcropolisProtectionSource -type ProtectionSourceAcropolisProtectionSource struct { - AcropolisProtectionSource -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ProtectionSourceAcropolisProtectionSource) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 AcropolisProtectionSource - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.AcropolisProtectionSource = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ProtectionSourceAcropolisProtectionSource) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.AcropolisProtectionSource) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this protection source acropolis protection source -func (m *ProtectionSourceAcropolisProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with AcropolisProtectionSource - if err := m.AcropolisProtectionSource.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this protection source acropolis protection source based on the context it is used -func (m *ProtectionSourceAcropolisProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with AcropolisProtectionSource - if err := m.AcropolisProtectionSource.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionSourceAcropolisProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionSourceAcropolisProtectionSource) UnmarshalBinary(b []byte) error { - var res ProtectionSourceAcropolisProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_source_ad_protection_source.go b/v1/models/protection_source_ad_protection_source.go deleted file mode 100644 index 7f8e19b7..00000000 --- a/v1/models/protection_source_ad_protection_source.go +++ /dev/null @@ -1,94 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionSourceAdProtectionSource Specifies details about an AD Protection Source -// when the environment is set to 'kAD'. -// -// swagger:model protectionSourceAdProtectionSource -type ProtectionSourceAdProtectionSource struct { - AdProtectionSource -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ProtectionSourceAdProtectionSource) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 AdProtectionSource - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.AdProtectionSource = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ProtectionSourceAdProtectionSource) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.AdProtectionSource) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this protection source ad protection source -func (m *ProtectionSourceAdProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with AdProtectionSource - if err := m.AdProtectionSource.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this protection source ad protection source based on the context it is used -func (m *ProtectionSourceAdProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with AdProtectionSource - if err := m.AdProtectionSource.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionSourceAdProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionSourceAdProtectionSource) UnmarshalBinary(b []byte) error { - var res ProtectionSourceAdProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_source_aws_protection_source.go b/v1/models/protection_source_aws_protection_source.go deleted file mode 100644 index 1e0212db..00000000 --- a/v1/models/protection_source_aws_protection_source.go +++ /dev/null @@ -1,94 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionSourceAwsProtectionSource Specifies details about an AWS Protection Source -// when the environment is set to 'kAWS'. -// -// swagger:model protectionSourceAwsProtectionSource -type ProtectionSourceAwsProtectionSource struct { - AwsProtectionSource -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ProtectionSourceAwsProtectionSource) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 AwsProtectionSource - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.AwsProtectionSource = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ProtectionSourceAwsProtectionSource) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.AwsProtectionSource) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this protection source aws protection source -func (m *ProtectionSourceAwsProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with AwsProtectionSource - if err := m.AwsProtectionSource.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this protection source aws protection source based on the context it is used -func (m *ProtectionSourceAwsProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with AwsProtectionSource - if err := m.AwsProtectionSource.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionSourceAwsProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionSourceAwsProtectionSource) UnmarshalBinary(b []byte) error { - var res ProtectionSourceAwsProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_source_azure_protection_source.go b/v1/models/protection_source_azure_protection_source.go deleted file mode 100644 index 5e2a3e7a..00000000 --- a/v1/models/protection_source_azure_protection_source.go +++ /dev/null @@ -1,94 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionSourceAzureProtectionSource Specifies details about an Azure Protection Source -// when the environment is set to 'kAzure'. -// -// swagger:model protectionSourceAzureProtectionSource -type ProtectionSourceAzureProtectionSource struct { - AzureProtectionSource -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ProtectionSourceAzureProtectionSource) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 AzureProtectionSource - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.AzureProtectionSource = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ProtectionSourceAzureProtectionSource) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.AzureProtectionSource) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this protection source azure protection source -func (m *ProtectionSourceAzureProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with AzureProtectionSource - if err := m.AzureProtectionSource.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this protection source azure protection source based on the context it is used -func (m *ProtectionSourceAzureProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with AzureProtectionSource - if err := m.AzureProtectionSource.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionSourceAzureProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionSourceAzureProtectionSource) UnmarshalBinary(b []byte) error { - var res ProtectionSourceAzureProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_source_cassandra_protection_source.go b/v1/models/protection_source_cassandra_protection_source.go deleted file mode 100644 index e86cea75..00000000 --- a/v1/models/protection_source_cassandra_protection_source.go +++ /dev/null @@ -1,94 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionSourceCassandraProtectionSource Specifies details about a Cassandra Protection Source -// when the environment is set to 'kCassandra'. -// -// swagger:model protectionSourceCassandraProtectionSource -type ProtectionSourceCassandraProtectionSource struct { - CassandraProtectionSource -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ProtectionSourceCassandraProtectionSource) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CassandraProtectionSource - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CassandraProtectionSource = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ProtectionSourceCassandraProtectionSource) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.CassandraProtectionSource) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this protection source cassandra protection source -func (m *ProtectionSourceCassandraProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CassandraProtectionSource - if err := m.CassandraProtectionSource.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this protection source cassandra protection source based on the context it is used -func (m *ProtectionSourceCassandraProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CassandraProtectionSource - if err := m.CassandraProtectionSource.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionSourceCassandraProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionSourceCassandraProtectionSource) UnmarshalBinary(b []byte) error { - var res ProtectionSourceCassandraProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_source_couchbase_protection_source.go b/v1/models/protection_source_couchbase_protection_source.go deleted file mode 100644 index 411b1f2c..00000000 --- a/v1/models/protection_source_couchbase_protection_source.go +++ /dev/null @@ -1,94 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionSourceCouchbaseProtectionSource Specifies details about a Couchbase Protection Source -// when the environment is set to 'kCouchbase'. -// -// swagger:model protectionSourceCouchbaseProtectionSource -type ProtectionSourceCouchbaseProtectionSource struct { - CouchbaseProtectionSource -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ProtectionSourceCouchbaseProtectionSource) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CouchbaseProtectionSource - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CouchbaseProtectionSource = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ProtectionSourceCouchbaseProtectionSource) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.CouchbaseProtectionSource) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this protection source couchbase protection source -func (m *ProtectionSourceCouchbaseProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CouchbaseProtectionSource - if err := m.CouchbaseProtectionSource.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this protection source couchbase protection source based on the context it is used -func (m *ProtectionSourceCouchbaseProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CouchbaseProtectionSource - if err := m.CouchbaseProtectionSource.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionSourceCouchbaseProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionSourceCouchbaseProtectionSource) UnmarshalBinary(b []byte) error { - var res ProtectionSourceCouchbaseProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_source_elastifile_protection_source.go b/v1/models/protection_source_elastifile_protection_source.go deleted file mode 100644 index 2ca7eee3..00000000 --- a/v1/models/protection_source_elastifile_protection_source.go +++ /dev/null @@ -1,94 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionSourceElastifileProtectionSource Specifies details about a Elastifile Protection Source -// when the environment is set to 'kElastifile'. -// -// swagger:model protectionSourceElastifileProtectionSource -type ProtectionSourceElastifileProtectionSource struct { - ElastifileProtectionSource -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ProtectionSourceElastifileProtectionSource) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 ElastifileProtectionSource - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.ElastifileProtectionSource = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ProtectionSourceElastifileProtectionSource) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.ElastifileProtectionSource) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this protection source elastifile protection source -func (m *ProtectionSourceElastifileProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ElastifileProtectionSource - if err := m.ElastifileProtectionSource.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this protection source elastifile protection source based on the context it is used -func (m *ProtectionSourceElastifileProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ElastifileProtectionSource - if err := m.ElastifileProtectionSource.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionSourceElastifileProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionSourceElastifileProtectionSource) UnmarshalBinary(b []byte) error { - var res ProtectionSourceElastifileProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_source_exchange_protection_source.go b/v1/models/protection_source_exchange_protection_source.go deleted file mode 100644 index 00171985..00000000 --- a/v1/models/protection_source_exchange_protection_source.go +++ /dev/null @@ -1,94 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionSourceExchangeProtectionSource Specifies details about an Exchange Protection Source -// when the environment is set to 'kExchange'. -// -// swagger:model protectionSourceExchangeProtectionSource -type ProtectionSourceExchangeProtectionSource struct { - ExchangeProtectionSource -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ProtectionSourceExchangeProtectionSource) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 ExchangeProtectionSource - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.ExchangeProtectionSource = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ProtectionSourceExchangeProtectionSource) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.ExchangeProtectionSource) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this protection source exchange protection source -func (m *ProtectionSourceExchangeProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ExchangeProtectionSource - if err := m.ExchangeProtectionSource.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this protection source exchange protection source based on the context it is used -func (m *ProtectionSourceExchangeProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ExchangeProtectionSource - if err := m.ExchangeProtectionSource.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionSourceExchangeProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionSourceExchangeProtectionSource) UnmarshalBinary(b []byte) error { - var res ProtectionSourceExchangeProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_source_flash_blade_protection_source.go b/v1/models/protection_source_flash_blade_protection_source.go deleted file mode 100644 index f411078c..00000000 --- a/v1/models/protection_source_flash_blade_protection_source.go +++ /dev/null @@ -1,94 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionSourceFlashBladeProtectionSource Specifies details about a Pure Storage FlashBlade Protection Source -// when the environment is set to 'kFlashBlade'. -// -// swagger:model protectionSourceFlashBladeProtectionSource -type ProtectionSourceFlashBladeProtectionSource struct { - FlashBladeProtectionSource -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ProtectionSourceFlashBladeProtectionSource) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 FlashBladeProtectionSource - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.FlashBladeProtectionSource = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ProtectionSourceFlashBladeProtectionSource) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.FlashBladeProtectionSource) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this protection source flash blade protection source -func (m *ProtectionSourceFlashBladeProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with FlashBladeProtectionSource - if err := m.FlashBladeProtectionSource.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this protection source flash blade protection source based on the context it is used -func (m *ProtectionSourceFlashBladeProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with FlashBladeProtectionSource - if err := m.FlashBladeProtectionSource.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionSourceFlashBladeProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionSourceFlashBladeProtectionSource) UnmarshalBinary(b []byte) error { - var res ProtectionSourceFlashBladeProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_source_gcp_protection_source.go b/v1/models/protection_source_gcp_protection_source.go deleted file mode 100644 index 91504299..00000000 --- a/v1/models/protection_source_gcp_protection_source.go +++ /dev/null @@ -1,94 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionSourceGcpProtectionSource Specifies details about an GCP Protection Source -// when the environment is set to 'kGCP'. -// -// swagger:model protectionSourceGcpProtectionSource -type ProtectionSourceGcpProtectionSource struct { - GcpProtectionSource -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ProtectionSourceGcpProtectionSource) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 GcpProtectionSource - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.GcpProtectionSource = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ProtectionSourceGcpProtectionSource) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.GcpProtectionSource) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this protection source gcp protection source -func (m *ProtectionSourceGcpProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with GcpProtectionSource - if err := m.GcpProtectionSource.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this protection source gcp protection source based on the context it is used -func (m *ProtectionSourceGcpProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with GcpProtectionSource - if err := m.GcpProtectionSource.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionSourceGcpProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionSourceGcpProtectionSource) UnmarshalBinary(b []byte) error { - var res ProtectionSourceGcpProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_source_gpfs_protection_source.go b/v1/models/protection_source_gpfs_protection_source.go deleted file mode 100644 index a405605b..00000000 --- a/v1/models/protection_source_gpfs_protection_source.go +++ /dev/null @@ -1,94 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionSourceGpfsProtectionSource Specifies details about an GPFS Protection Source -// when the environment is set to 'kGPFS'. -// -// swagger:model protectionSourceGpfsProtectionSource -type ProtectionSourceGpfsProtectionSource struct { - GpfsProtectionSource -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ProtectionSourceGpfsProtectionSource) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 GpfsProtectionSource - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.GpfsProtectionSource = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ProtectionSourceGpfsProtectionSource) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.GpfsProtectionSource) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this protection source gpfs protection source -func (m *ProtectionSourceGpfsProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with GpfsProtectionSource - if err := m.GpfsProtectionSource.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this protection source gpfs protection source based on the context it is used -func (m *ProtectionSourceGpfsProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with GpfsProtectionSource - if err := m.GpfsProtectionSource.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionSourceGpfsProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionSourceGpfsProtectionSource) UnmarshalBinary(b []byte) error { - var res ProtectionSourceGpfsProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_source_hbase_protection_source.go b/v1/models/protection_source_hbase_protection_source.go deleted file mode 100644 index 4d95c740..00000000 --- a/v1/models/protection_source_hbase_protection_source.go +++ /dev/null @@ -1,94 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionSourceHbaseProtectionSource Specifies details about a HBase Protection Source -// when the environment is set to 'kHBase'. -// -// swagger:model protectionSourceHbaseProtectionSource -type ProtectionSourceHbaseProtectionSource struct { - HBaseProtectionSource -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ProtectionSourceHbaseProtectionSource) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 HBaseProtectionSource - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.HBaseProtectionSource = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ProtectionSourceHbaseProtectionSource) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.HBaseProtectionSource) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this protection source hbase protection source -func (m *ProtectionSourceHbaseProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with HBaseProtectionSource - if err := m.HBaseProtectionSource.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this protection source hbase protection source based on the context it is used -func (m *ProtectionSourceHbaseProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with HBaseProtectionSource - if err := m.HBaseProtectionSource.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionSourceHbaseProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionSourceHbaseProtectionSource) UnmarshalBinary(b []byte) error { - var res ProtectionSourceHbaseProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_source_hdfs_protection_source.go b/v1/models/protection_source_hdfs_protection_source.go deleted file mode 100644 index 3a6e7b7e..00000000 --- a/v1/models/protection_source_hdfs_protection_source.go +++ /dev/null @@ -1,94 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionSourceHdfsProtectionSource Specifies details about a Hdfs Protection Source -// when the environment is set to 'kHdfs'. -// -// swagger:model protectionSourceHdfsProtectionSource -type ProtectionSourceHdfsProtectionSource struct { - HdfsProtectionSource -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ProtectionSourceHdfsProtectionSource) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 HdfsProtectionSource - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.HdfsProtectionSource = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ProtectionSourceHdfsProtectionSource) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.HdfsProtectionSource) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this protection source hdfs protection source -func (m *ProtectionSourceHdfsProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with HdfsProtectionSource - if err := m.HdfsProtectionSource.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this protection source hdfs protection source based on the context it is used -func (m *ProtectionSourceHdfsProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with HdfsProtectionSource - if err := m.HdfsProtectionSource.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionSourceHdfsProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionSourceHdfsProtectionSource) UnmarshalBinary(b []byte) error { - var res ProtectionSourceHdfsProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_source_hive_protection_source.go b/v1/models/protection_source_hive_protection_source.go deleted file mode 100644 index 54dc6888..00000000 --- a/v1/models/protection_source_hive_protection_source.go +++ /dev/null @@ -1,94 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionSourceHiveProtectionSource Specifies details about a Hive Protection Source -// when the environment is set to 'kHive'. -// -// swagger:model protectionSourceHiveProtectionSource -type ProtectionSourceHiveProtectionSource struct { - HiveProtectionSource -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ProtectionSourceHiveProtectionSource) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 HiveProtectionSource - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.HiveProtectionSource = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ProtectionSourceHiveProtectionSource) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.HiveProtectionSource) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this protection source hive protection source -func (m *ProtectionSourceHiveProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with HiveProtectionSource - if err := m.HiveProtectionSource.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this protection source hive protection source based on the context it is used -func (m *ProtectionSourceHiveProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with HiveProtectionSource - if err := m.HiveProtectionSource.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionSourceHiveProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionSourceHiveProtectionSource) UnmarshalBinary(b []byte) error { - var res ProtectionSourceHiveProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_source_hyper_flex_protection_source.go b/v1/models/protection_source_hyper_flex_protection_source.go deleted file mode 100644 index d896ec23..00000000 --- a/v1/models/protection_source_hyper_flex_protection_source.go +++ /dev/null @@ -1,94 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionSourceHyperFlexProtectionSource Specifies details about a HyperFlex Storage Snapshot source -// when the environment is set to 'kHyperFlex' -// -// swagger:model protectionSourceHyperFlexProtectionSource -type ProtectionSourceHyperFlexProtectionSource struct { - HyperFlexProtectionSource -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ProtectionSourceHyperFlexProtectionSource) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 HyperFlexProtectionSource - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.HyperFlexProtectionSource = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ProtectionSourceHyperFlexProtectionSource) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.HyperFlexProtectionSource) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this protection source hyper flex protection source -func (m *ProtectionSourceHyperFlexProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with HyperFlexProtectionSource - if err := m.HyperFlexProtectionSource.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this protection source hyper flex protection source based on the context it is used -func (m *ProtectionSourceHyperFlexProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with HyperFlexProtectionSource - if err := m.HyperFlexProtectionSource.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionSourceHyperFlexProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionSourceHyperFlexProtectionSource) UnmarshalBinary(b []byte) error { - var res ProtectionSourceHyperFlexProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_source_hyperv_protection_source.go b/v1/models/protection_source_hyperv_protection_source.go deleted file mode 100644 index 2eb82f38..00000000 --- a/v1/models/protection_source_hyperv_protection_source.go +++ /dev/null @@ -1,94 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionSourceHypervProtectionSource Specifies details about a HyperV Protection Source -// when the environment is set to 'kHyperV'. -// -// swagger:model protectionSourceHypervProtectionSource -type ProtectionSourceHypervProtectionSource struct { - HypervProtectionSource -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ProtectionSourceHypervProtectionSource) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 HypervProtectionSource - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.HypervProtectionSource = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ProtectionSourceHypervProtectionSource) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.HypervProtectionSource) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this protection source hyperv protection source -func (m *ProtectionSourceHypervProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with HypervProtectionSource - if err := m.HypervProtectionSource.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this protection source hyperv protection source based on the context it is used -func (m *ProtectionSourceHypervProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with HypervProtectionSource - if err := m.HypervProtectionSource.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionSourceHypervProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionSourceHypervProtectionSource) UnmarshalBinary(b []byte) error { - var res ProtectionSourceHypervProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_source_ibm_flash_system_protection_source.go b/v1/models/protection_source_ibm_flash_system_protection_source.go deleted file mode 100644 index 25fa0f5c..00000000 --- a/v1/models/protection_source_ibm_flash_system_protection_source.go +++ /dev/null @@ -1,94 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionSourceIbmFlashSystemProtectionSource Specifies details about an Ibm Flash System Protection Source -// when the environment is set to 'kIbmFlashSystem'. -// -// swagger:model protectionSourceIbmFlashSystemProtectionSource -type ProtectionSourceIbmFlashSystemProtectionSource struct { - IbmFlashSystemProtectionSource -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ProtectionSourceIbmFlashSystemProtectionSource) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 IbmFlashSystemProtectionSource - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.IbmFlashSystemProtectionSource = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ProtectionSourceIbmFlashSystemProtectionSource) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.IbmFlashSystemProtectionSource) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this protection source ibm flash system protection source -func (m *ProtectionSourceIbmFlashSystemProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with IbmFlashSystemProtectionSource - if err := m.IbmFlashSystemProtectionSource.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this protection source ibm flash system protection source based on the context it is used -func (m *ProtectionSourceIbmFlashSystemProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with IbmFlashSystemProtectionSource - if err := m.IbmFlashSystemProtectionSource.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionSourceIbmFlashSystemProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionSourceIbmFlashSystemProtectionSource) UnmarshalBinary(b []byte) error { - var res ProtectionSourceIbmFlashSystemProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_source_isilon_protection_source.go b/v1/models/protection_source_isilon_protection_source.go deleted file mode 100644 index 97c3103e..00000000 --- a/v1/models/protection_source_isilon_protection_source.go +++ /dev/null @@ -1,94 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionSourceIsilonProtectionSource Specifies details about an Isilon OneFs Protection Source -// when the environment is set to 'kIsilon'. -// -// swagger:model protectionSourceIsilonProtectionSource -type ProtectionSourceIsilonProtectionSource struct { - IsilonProtectionSource -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ProtectionSourceIsilonProtectionSource) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 IsilonProtectionSource - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.IsilonProtectionSource = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ProtectionSourceIsilonProtectionSource) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.IsilonProtectionSource) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this protection source isilon protection source -func (m *ProtectionSourceIsilonProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with IsilonProtectionSource - if err := m.IsilonProtectionSource.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this protection source isilon protection source based on the context it is used -func (m *ProtectionSourceIsilonProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with IsilonProtectionSource - if err := m.IsilonProtectionSource.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionSourceIsilonProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionSourceIsilonProtectionSource) UnmarshalBinary(b []byte) error { - var res ProtectionSourceIsilonProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_source_kubernetes_protection_source.go b/v1/models/protection_source_kubernetes_protection_source.go deleted file mode 100644 index 45de728b..00000000 --- a/v1/models/protection_source_kubernetes_protection_source.go +++ /dev/null @@ -1,94 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionSourceKubernetesProtectionSource Specifies details about a Kubernetes Protection Source -// when the environment is set to 'kKubernetes'. -// -// swagger:model protectionSourceKubernetesProtectionSource -type ProtectionSourceKubernetesProtectionSource struct { - KubernetesProtectionSource -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ProtectionSourceKubernetesProtectionSource) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 KubernetesProtectionSource - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.KubernetesProtectionSource = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ProtectionSourceKubernetesProtectionSource) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.KubernetesProtectionSource) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this protection source kubernetes protection source -func (m *ProtectionSourceKubernetesProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with KubernetesProtectionSource - if err := m.KubernetesProtectionSource.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this protection source kubernetes protection source based on the context it is used -func (m *ProtectionSourceKubernetesProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with KubernetesProtectionSource - if err := m.KubernetesProtectionSource.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionSourceKubernetesProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionSourceKubernetesProtectionSource) UnmarshalBinary(b []byte) error { - var res ProtectionSourceKubernetesProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_source_kvm_protection_source.go b/v1/models/protection_source_kvm_protection_source.go deleted file mode 100644 index ceb0a14b..00000000 --- a/v1/models/protection_source_kvm_protection_source.go +++ /dev/null @@ -1,94 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionSourceKvmProtectionSource Specifies details about a KVM Protection Source -// when the environment is set to 'kKVM'. -// -// swagger:model protectionSourceKvmProtectionSource -type ProtectionSourceKvmProtectionSource struct { - KvmProtectionSource -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ProtectionSourceKvmProtectionSource) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 KvmProtectionSource - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.KvmProtectionSource = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ProtectionSourceKvmProtectionSource) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.KvmProtectionSource) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this protection source kvm protection source -func (m *ProtectionSourceKvmProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with KvmProtectionSource - if err := m.KvmProtectionSource.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this protection source kvm protection source based on the context it is used -func (m *ProtectionSourceKvmProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with KvmProtectionSource - if err := m.KvmProtectionSource.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionSourceKvmProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionSourceKvmProtectionSource) UnmarshalBinary(b []byte) error { - var res ProtectionSourceKvmProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_source_mongodb_protection_source.go b/v1/models/protection_source_mongodb_protection_source.go deleted file mode 100644 index ad274ed1..00000000 --- a/v1/models/protection_source_mongodb_protection_source.go +++ /dev/null @@ -1,94 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionSourceMongodbProtectionSource Specifies details about a MongoDB Protection Source -// when the environment is set to 'kMongoDB'. -// -// swagger:model protectionSourceMongodbProtectionSource -type ProtectionSourceMongodbProtectionSource struct { - MongoDBProtectionSource -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ProtectionSourceMongodbProtectionSource) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 MongoDBProtectionSource - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.MongoDBProtectionSource = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ProtectionSourceMongodbProtectionSource) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.MongoDBProtectionSource) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this protection source mongodb protection source -func (m *ProtectionSourceMongodbProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with MongoDBProtectionSource - if err := m.MongoDBProtectionSource.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this protection source mongodb protection source based on the context it is used -func (m *ProtectionSourceMongodbProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with MongoDBProtectionSource - if err := m.MongoDBProtectionSource.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionSourceMongodbProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionSourceMongodbProtectionSource) UnmarshalBinary(b []byte) error { - var res ProtectionSourceMongodbProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_source_nas_protection_source.go b/v1/models/protection_source_nas_protection_source.go deleted file mode 100644 index 86a70385..00000000 --- a/v1/models/protection_source_nas_protection_source.go +++ /dev/null @@ -1,94 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionSourceNasProtectionSource Specifies details about a Generic NAS Protection Source -// when the environment is set to 'kGenericNas'. -// -// swagger:model protectionSourceNasProtectionSource -type ProtectionSourceNasProtectionSource struct { - NasProtectionSource -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ProtectionSourceNasProtectionSource) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 NasProtectionSource - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.NasProtectionSource = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ProtectionSourceNasProtectionSource) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.NasProtectionSource) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this protection source nas protection source -func (m *ProtectionSourceNasProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with NasProtectionSource - if err := m.NasProtectionSource.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this protection source nas protection source based on the context it is used -func (m *ProtectionSourceNasProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with NasProtectionSource - if err := m.NasProtectionSource.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionSourceNasProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionSourceNasProtectionSource) UnmarshalBinary(b []byte) error { - var res ProtectionSourceNasProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_source_netapp_protection_source.go b/v1/models/protection_source_netapp_protection_source.go deleted file mode 100644 index 41dc781d..00000000 --- a/v1/models/protection_source_netapp_protection_source.go +++ /dev/null @@ -1,94 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionSourceNetappProtectionSource Specifies details about a NetApp Protection Source -// when the environment is set to 'kNetapp'. -// -// swagger:model protectionSourceNetappProtectionSource -type ProtectionSourceNetappProtectionSource struct { - NetappProtectionSource -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ProtectionSourceNetappProtectionSource) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 NetappProtectionSource - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.NetappProtectionSource = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ProtectionSourceNetappProtectionSource) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.NetappProtectionSource) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this protection source netapp protection source -func (m *ProtectionSourceNetappProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with NetappProtectionSource - if err := m.NetappProtectionSource.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this protection source netapp protection source based on the context it is used -func (m *ProtectionSourceNetappProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with NetappProtectionSource - if err := m.NetappProtectionSource.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionSourceNetappProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionSourceNetappProtectionSource) UnmarshalBinary(b []byte) error { - var res ProtectionSourceNetappProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_source_nimble_protection_source.go b/v1/models/protection_source_nimble_protection_source.go deleted file mode 100644 index 67a4ca4a..00000000 --- a/v1/models/protection_source_nimble_protection_source.go +++ /dev/null @@ -1,94 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionSourceNimbleProtectionSource Specifies details about a SAN Protection Source -// when the environment is set to 'kNimble'. -// -// swagger:model protectionSourceNimbleProtectionSource -type ProtectionSourceNimbleProtectionSource struct { - NimbleProtectionSource -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ProtectionSourceNimbleProtectionSource) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 NimbleProtectionSource - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.NimbleProtectionSource = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ProtectionSourceNimbleProtectionSource) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.NimbleProtectionSource) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this protection source nimble protection source -func (m *ProtectionSourceNimbleProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with NimbleProtectionSource - if err := m.NimbleProtectionSource.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this protection source nimble protection source based on the context it is used -func (m *ProtectionSourceNimbleProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with NimbleProtectionSource - if err := m.NimbleProtectionSource.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionSourceNimbleProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionSourceNimbleProtectionSource) UnmarshalBinary(b []byte) error { - var res ProtectionSourceNimbleProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_source_node.go b/v1/models/protection_source_node.go index fa68d062..c6da13fa 100644 --- a/v1/models/protection_source_node.go +++ b/v1/models/protection_source_node.go @@ -70,11 +70,17 @@ type ProtectionSourceNode struct { // be available at the 0th index of the vector. ProtectedSourcesSummary []*AggregatedSubtreeInfo `json:"protectedSourcesSummary"` - // protection source - ProtectionSource *ProtectionSourceNodeProtectionSource `json:"protectionSource,omitempty"` - - // registration info - RegistrationInfo *ProtectionSourceNodeRegistrationInfo `json:"registrationInfo,omitempty"` + // Specifies the Protection Source for the current node. + ProtectionSource struct { + ProtectionSource + } `json:"protectionSource,omitempty"` + + // Specifies registration information for a root node in a Protection + // Sources tree. A root node represents a registered Source on the + // Cohesity Cluster, such as a vCenter Server. + RegistrationInfo struct { + RegisteredSourceInfo + } `json:"registrationInfo,omitempty"` // Specifies the total bytes downtiered from the source so far. TotalDowntieredSizeInBytes *int64 `json:"totalDowntieredSizeInBytes,omitempty"` @@ -244,17 +250,6 @@ func (m *ProtectionSourceNode) validateProtectionSource(formats strfmt.Registry) return nil } - if m.ProtectionSource != nil { - if err := m.ProtectionSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectionSource") - } - return err - } - } - return nil } @@ -263,17 +258,6 @@ func (m *ProtectionSourceNode) validateRegistrationInfo(formats strfmt.Registry) return nil } - if m.RegistrationInfo != nil { - if err := m.RegistrationInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("registrationInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("registrationInfo") - } - return err - } - } - return nil } @@ -456,43 +440,11 @@ func (m *ProtectionSourceNode) contextValidateProtectedSourcesSummary(ctx contex func (m *ProtectionSourceNode) contextValidateProtectionSource(ctx context.Context, formats strfmt.Registry) error { - if m.ProtectionSource != nil { - - if swag.IsZero(m.ProtectionSource) { // not required - return nil - } - - if err := m.ProtectionSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectionSource") - } - return err - } - } - return nil } func (m *ProtectionSourceNode) contextValidateRegistrationInfo(ctx context.Context, formats strfmt.Registry) error { - if m.RegistrationInfo != nil { - - if swag.IsZero(m.RegistrationInfo) { // not required - return nil - } - - if err := m.RegistrationInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("registrationInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("registrationInfo") - } - return err - } - } - return nil } diff --git a/v1/models/protection_source_node_protection_source.go b/v1/models/protection_source_node_protection_source.go deleted file mode 100644 index 41651bff..00000000 --- a/v1/models/protection_source_node_protection_source.go +++ /dev/null @@ -1,93 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionSourceNodeProtectionSource Specifies the Protection Source for the current node. -// -// swagger:model protectionSourceNodeProtectionSource -type ProtectionSourceNodeProtectionSource struct { - ProtectionSource -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ProtectionSourceNodeProtectionSource) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 ProtectionSource - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.ProtectionSource = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ProtectionSourceNodeProtectionSource) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.ProtectionSource) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this protection source node protection source -func (m *ProtectionSourceNodeProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ProtectionSource - if err := m.ProtectionSource.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this protection source node protection source based on the context it is used -func (m *ProtectionSourceNodeProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ProtectionSource - if err := m.ProtectionSource.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionSourceNodeProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionSourceNodeProtectionSource) UnmarshalBinary(b []byte) error { - var res ProtectionSourceNodeProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_source_node_registration_info.go b/v1/models/protection_source_node_registration_info.go deleted file mode 100644 index 7379cf8f..00000000 --- a/v1/models/protection_source_node_registration_info.go +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionSourceNodeRegistrationInfo Specifies registration information for a root node in a Protection -// Sources tree. A root node represents a registered Source on the -// Cohesity Cluster, such as a vCenter Server. -// -// swagger:model protectionSourceNodeRegistrationInfo -type ProtectionSourceNodeRegistrationInfo struct { - RegisteredSourceInfo -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ProtectionSourceNodeRegistrationInfo) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 RegisteredSourceInfo - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.RegisteredSourceInfo = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ProtectionSourceNodeRegistrationInfo) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.RegisteredSourceInfo) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this protection source node registration info -func (m *ProtectionSourceNodeRegistrationInfo) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with RegisteredSourceInfo - if err := m.RegisteredSourceInfo.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this protection source node registration info based on the context it is used -func (m *ProtectionSourceNodeRegistrationInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with RegisteredSourceInfo - if err := m.RegisteredSourceInfo.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionSourceNodeRegistrationInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionSourceNodeRegistrationInfo) UnmarshalBinary(b []byte) error { - var res ProtectionSourceNodeRegistrationInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_source_office365_protection_source.go b/v1/models/protection_source_office365_protection_source.go deleted file mode 100644 index ce6e6c4b..00000000 --- a/v1/models/protection_source_office365_protection_source.go +++ /dev/null @@ -1,94 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionSourceOffice365ProtectionSource Specifies details about an Office 365 Protection Source -// when the environment is set to 'kO365'. -// -// swagger:model protectionSourceOffice365ProtectionSource -type ProtectionSourceOffice365ProtectionSource struct { - Office365ProtectionSource -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ProtectionSourceOffice365ProtectionSource) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 Office365ProtectionSource - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.Office365ProtectionSource = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ProtectionSourceOffice365ProtectionSource) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.Office365ProtectionSource) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this protection source office365 protection source -func (m *ProtectionSourceOffice365ProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with Office365ProtectionSource - if err := m.Office365ProtectionSource.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this protection source office365 protection source based on the context it is used -func (m *ProtectionSourceOffice365ProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with Office365ProtectionSource - if err := m.Office365ProtectionSource.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionSourceOffice365ProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionSourceOffice365ProtectionSource) UnmarshalBinary(b []byte) error { - var res ProtectionSourceOffice365ProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_source_oracle_protection_source.go b/v1/models/protection_source_oracle_protection_source.go deleted file mode 100644 index c354708c..00000000 --- a/v1/models/protection_source_oracle_protection_source.go +++ /dev/null @@ -1,94 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionSourceOracleProtectionSource Specifies details about an Oracle Protection Source -// when the environment is set to 'kOracle'. -// -// swagger:model protectionSourceOracleProtectionSource -type ProtectionSourceOracleProtectionSource struct { - OracleProtectionSource -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ProtectionSourceOracleProtectionSource) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 OracleProtectionSource - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.OracleProtectionSource = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ProtectionSourceOracleProtectionSource) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.OracleProtectionSource) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this protection source oracle protection source -func (m *ProtectionSourceOracleProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with OracleProtectionSource - if err := m.OracleProtectionSource.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this protection source oracle protection source based on the context it is used -func (m *ProtectionSourceOracleProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with OracleProtectionSource - if err := m.OracleProtectionSource.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionSourceOracleProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionSourceOracleProtectionSource) UnmarshalBinary(b []byte) error { - var res ProtectionSourceOracleProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_source_physical_protection_source.go b/v1/models/protection_source_physical_protection_source.go deleted file mode 100644 index 6d40d0ac..00000000 --- a/v1/models/protection_source_physical_protection_source.go +++ /dev/null @@ -1,94 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionSourcePhysicalProtectionSource Specifies details about a Physical Protection Source -// when the environment is set to 'kPhysical'. -// -// swagger:model protectionSourcePhysicalProtectionSource -type ProtectionSourcePhysicalProtectionSource struct { - PhysicalProtectionSource -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ProtectionSourcePhysicalProtectionSource) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 PhysicalProtectionSource - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.PhysicalProtectionSource = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ProtectionSourcePhysicalProtectionSource) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.PhysicalProtectionSource) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this protection source physical protection source -func (m *ProtectionSourcePhysicalProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with PhysicalProtectionSource - if err := m.PhysicalProtectionSource.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this protection source physical protection source based on the context it is used -func (m *ProtectionSourcePhysicalProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with PhysicalProtectionSource - if err := m.PhysicalProtectionSource.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionSourcePhysicalProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionSourcePhysicalProtectionSource) UnmarshalBinary(b []byte) error { - var res ProtectionSourcePhysicalProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_source_pure_protection_source.go b/v1/models/protection_source_pure_protection_source.go deleted file mode 100644 index 7950f819..00000000 --- a/v1/models/protection_source_pure_protection_source.go +++ /dev/null @@ -1,94 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionSourcePureProtectionSource Specifies details about a Pure Protection Source -// when the environment is set to 'kPure'. -// -// swagger:model protectionSourcePureProtectionSource -type ProtectionSourcePureProtectionSource struct { - PureProtectionSource -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ProtectionSourcePureProtectionSource) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 PureProtectionSource - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.PureProtectionSource = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ProtectionSourcePureProtectionSource) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.PureProtectionSource) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this protection source pure protection source -func (m *ProtectionSourcePureProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with PureProtectionSource - if err := m.PureProtectionSource.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this protection source pure protection source based on the context it is used -func (m *ProtectionSourcePureProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with PureProtectionSource - if err := m.PureProtectionSource.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionSourcePureProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionSourcePureProtectionSource) UnmarshalBinary(b []byte) error { - var res ProtectionSourcePureProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_source_sfdc_protection_source.go b/v1/models/protection_source_sfdc_protection_source.go deleted file mode 100644 index c1875e85..00000000 --- a/v1/models/protection_source_sfdc_protection_source.go +++ /dev/null @@ -1,94 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionSourceSfdcProtectionSource Specifies details about a Salesforce Protection Source -// when the environment is set to 'kSfdc'. -// -// swagger:model protectionSourceSfdcProtectionSource -type ProtectionSourceSfdcProtectionSource struct { - SfdcProtectionSource -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ProtectionSourceSfdcProtectionSource) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 SfdcProtectionSource - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.SfdcProtectionSource = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ProtectionSourceSfdcProtectionSource) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.SfdcProtectionSource) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this protection source sfdc protection source -func (m *ProtectionSourceSfdcProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with SfdcProtectionSource - if err := m.SfdcProtectionSource.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this protection source sfdc protection source based on the context it is used -func (m *ProtectionSourceSfdcProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with SfdcProtectionSource - if err := m.SfdcProtectionSource.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionSourceSfdcProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionSourceSfdcProtectionSource) UnmarshalBinary(b []byte) error { - var res ProtectionSourceSfdcProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_source_sql_protection_source.go b/v1/models/protection_source_sql_protection_source.go deleted file mode 100644 index 710400a5..00000000 --- a/v1/models/protection_source_sql_protection_source.go +++ /dev/null @@ -1,94 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionSourceSQLProtectionSource Specifies details about a SQL Protection Source -// when the environment is set to 'kSQL'. -// -// swagger:model protectionSourceSqlProtectionSource -type ProtectionSourceSQLProtectionSource struct { - SQLProtectionSource -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ProtectionSourceSQLProtectionSource) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 SQLProtectionSource - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.SQLProtectionSource = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ProtectionSourceSQLProtectionSource) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.SQLProtectionSource) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this protection source Sql protection source -func (m *ProtectionSourceSQLProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with SQLProtectionSource - if err := m.SQLProtectionSource.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this protection source Sql protection source based on the context it is used -func (m *ProtectionSourceSQLProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with SQLProtectionSource - if err := m.SQLProtectionSource.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionSourceSQLProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionSourceSQLProtectionSource) UnmarshalBinary(b []byte) error { - var res ProtectionSourceSQLProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_source_tree_info.go b/v1/models/protection_source_tree_info.go index 6fc07206..a57e11d2 100644 --- a/v1/models/protection_source_tree_info.go +++ b/v1/models/protection_source_tree_info.go @@ -44,14 +44,23 @@ type ProtectionSourceTreeInfo struct { // v7.1) MaintenanceModeConfig *MaintenanceModeConfigProto `json:"maintenanceModeConfig,omitempty"` - // registration info - RegistrationInfo *ProtectionSourceTreeInfoRegistrationInfo `json:"registrationInfo,omitempty"` - - // root node - RootNode *ProtectionSourceTreeInfoRootNode `json:"rootNode,omitempty"` - - // stats - Stats *ProtectionSourceTreeInfoStats `json:"stats,omitempty"` + // Specifies registration information for a root node in a Protection + // Sources tree. A root node represents a registered Source on the + // Cohesity Cluster, such as a vCenter Server. + RegistrationInfo struct { + RegisteredSourceInfo + } `json:"registrationInfo,omitempty"` + + // Specifies the Protection Source for the root node of the Protection + // Source tree. + RootNode struct { + ProtectionSource + } `json:"rootNode,omitempty"` + + // Specifies the stats of protection for a Protection Source Tree. + Stats struct { + ProtectionSummary + } `json:"stats,omitempty"` // Specifies the breakdown of the stats of protection by environment. // overrideDescription: true @@ -171,17 +180,6 @@ func (m *ProtectionSourceTreeInfo) validateRegistrationInfo(formats strfmt.Regis return nil } - if m.RegistrationInfo != nil { - if err := m.RegistrationInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("registrationInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("registrationInfo") - } - return err - } - } - return nil } @@ -190,17 +188,6 @@ func (m *ProtectionSourceTreeInfo) validateRootNode(formats strfmt.Registry) err return nil } - if m.RootNode != nil { - if err := m.RootNode.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rootNode") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rootNode") - } - return err - } - } - return nil } @@ -209,17 +196,6 @@ func (m *ProtectionSourceTreeInfo) validateStats(formats strfmt.Registry) error return nil } - if m.Stats != nil { - if err := m.Stats.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("stats") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("stats") - } - return err - } - } - return nil } @@ -356,64 +332,16 @@ func (m *ProtectionSourceTreeInfo) contextValidateMaintenanceModeConfig(ctx cont func (m *ProtectionSourceTreeInfo) contextValidateRegistrationInfo(ctx context.Context, formats strfmt.Registry) error { - if m.RegistrationInfo != nil { - - if swag.IsZero(m.RegistrationInfo) { // not required - return nil - } - - if err := m.RegistrationInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("registrationInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("registrationInfo") - } - return err - } - } - return nil } func (m *ProtectionSourceTreeInfo) contextValidateRootNode(ctx context.Context, formats strfmt.Registry) error { - if m.RootNode != nil { - - if swag.IsZero(m.RootNode) { // not required - return nil - } - - if err := m.RootNode.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rootNode") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rootNode") - } - return err - } - } - return nil } func (m *ProtectionSourceTreeInfo) contextValidateStats(ctx context.Context, formats strfmt.Registry) error { - if m.Stats != nil { - - if swag.IsZero(m.Stats) { // not required - return nil - } - - if err := m.Stats.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("stats") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("stats") - } - return err - } - } - return nil } diff --git a/v1/models/protection_source_tree_info_registration_info.go b/v1/models/protection_source_tree_info_registration_info.go deleted file mode 100644 index 74cc1672..00000000 --- a/v1/models/protection_source_tree_info_registration_info.go +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionSourceTreeInfoRegistrationInfo Specifies registration information for a root node in a Protection -// Sources tree. A root node represents a registered Source on the -// Cohesity Cluster, such as a vCenter Server. -// -// swagger:model protectionSourceTreeInfoRegistrationInfo -type ProtectionSourceTreeInfoRegistrationInfo struct { - RegisteredSourceInfo -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ProtectionSourceTreeInfoRegistrationInfo) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 RegisteredSourceInfo - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.RegisteredSourceInfo = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ProtectionSourceTreeInfoRegistrationInfo) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.RegisteredSourceInfo) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this protection source tree info registration info -func (m *ProtectionSourceTreeInfoRegistrationInfo) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with RegisteredSourceInfo - if err := m.RegisteredSourceInfo.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this protection source tree info registration info based on the context it is used -func (m *ProtectionSourceTreeInfoRegistrationInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with RegisteredSourceInfo - if err := m.RegisteredSourceInfo.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionSourceTreeInfoRegistrationInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionSourceTreeInfoRegistrationInfo) UnmarshalBinary(b []byte) error { - var res ProtectionSourceTreeInfoRegistrationInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_source_tree_info_root_node.go b/v1/models/protection_source_tree_info_root_node.go deleted file mode 100644 index a31977f4..00000000 --- a/v1/models/protection_source_tree_info_root_node.go +++ /dev/null @@ -1,94 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionSourceTreeInfoRootNode Specifies the Protection Source for the root node of the Protection -// Source tree. -// -// swagger:model protectionSourceTreeInfoRootNode -type ProtectionSourceTreeInfoRootNode struct { - ProtectionSource -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ProtectionSourceTreeInfoRootNode) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 ProtectionSource - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.ProtectionSource = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ProtectionSourceTreeInfoRootNode) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.ProtectionSource) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this protection source tree info root node -func (m *ProtectionSourceTreeInfoRootNode) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ProtectionSource - if err := m.ProtectionSource.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this protection source tree info root node based on the context it is used -func (m *ProtectionSourceTreeInfoRootNode) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ProtectionSource - if err := m.ProtectionSource.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionSourceTreeInfoRootNode) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionSourceTreeInfoRootNode) UnmarshalBinary(b []byte) error { - var res ProtectionSourceTreeInfoRootNode - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_source_tree_info_stats.go b/v1/models/protection_source_tree_info_stats.go deleted file mode 100644 index df049b0d..00000000 --- a/v1/models/protection_source_tree_info_stats.go +++ /dev/null @@ -1,93 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionSourceTreeInfoStats Specifies the stats of protection for a Protection Source Tree. -// -// swagger:model protectionSourceTreeInfoStats -type ProtectionSourceTreeInfoStats struct { - ProtectionSummary -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ProtectionSourceTreeInfoStats) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 ProtectionSummary - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.ProtectionSummary = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ProtectionSourceTreeInfoStats) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.ProtectionSummary) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this protection source tree info stats -func (m *ProtectionSourceTreeInfoStats) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ProtectionSummary - if err := m.ProtectionSummary.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this protection source tree info stats based on the context it is used -func (m *ProtectionSourceTreeInfoStats) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ProtectionSummary - if err := m.ProtectionSummary.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionSourceTreeInfoStats) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionSourceTreeInfoStats) UnmarshalBinary(b []byte) error { - var res ProtectionSourceTreeInfoStats - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_source_uda_protection_source.go b/v1/models/protection_source_uda_protection_source.go deleted file mode 100644 index 2ed5e2bc..00000000 --- a/v1/models/protection_source_uda_protection_source.go +++ /dev/null @@ -1,94 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionSourceUdaProtectionSource Specifies details about a Universal Data Adapter Protection Source -// when the environment is set to 'kUDA'. -// -// swagger:model protectionSourceUdaProtectionSource -type ProtectionSourceUdaProtectionSource struct { - UdaProtectionSource -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ProtectionSourceUdaProtectionSource) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 UdaProtectionSource - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.UdaProtectionSource = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ProtectionSourceUdaProtectionSource) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.UdaProtectionSource) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this protection source uda protection source -func (m *ProtectionSourceUdaProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UdaProtectionSource - if err := m.UdaProtectionSource.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this protection source uda protection source based on the context it is used -func (m *ProtectionSourceUdaProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UdaProtectionSource - if err := m.UdaProtectionSource.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionSourceUdaProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionSourceUdaProtectionSource) UnmarshalBinary(b []byte) error { - var res ProtectionSourceUdaProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_source_view_protection_source.go b/v1/models/protection_source_view_protection_source.go deleted file mode 100644 index 8fca4ce0..00000000 --- a/v1/models/protection_source_view_protection_source.go +++ /dev/null @@ -1,94 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionSourceViewProtectionSource Specifies details about a View Protection Source -// when the environment is set to 'kView'. -// -// swagger:model protectionSourceViewProtectionSource -type ProtectionSourceViewProtectionSource struct { - ViewProtectionSource -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ProtectionSourceViewProtectionSource) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 ViewProtectionSource - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.ViewProtectionSource = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ProtectionSourceViewProtectionSource) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.ViewProtectionSource) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this protection source view protection source -func (m *ProtectionSourceViewProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ViewProtectionSource - if err := m.ViewProtectionSource.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this protection source view protection source based on the context it is used -func (m *ProtectionSourceViewProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ViewProtectionSource - if err := m.ViewProtectionSource.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionSourceViewProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionSourceViewProtectionSource) UnmarshalBinary(b []byte) error { - var res ProtectionSourceViewProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_source_vm_ware_protection_source.go b/v1/models/protection_source_vm_ware_protection_source.go deleted file mode 100644 index 133c7c8c..00000000 --- a/v1/models/protection_source_vm_ware_protection_source.go +++ /dev/null @@ -1,94 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionSourceVMWareProtectionSource Specifies details about a VMware Protection Source -// when the environment is set to 'kVMware'. -// -// swagger:model protectionSourceVmWareProtectionSource -type ProtectionSourceVMWareProtectionSource struct { - VMwareProtectionSource -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ProtectionSourceVMWareProtectionSource) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 VMwareProtectionSource - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.VMwareProtectionSource = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ProtectionSourceVMWareProtectionSource) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.VMwareProtectionSource) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this protection source Vm ware protection source -func (m *ProtectionSourceVMWareProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with VMwareProtectionSource - if err := m.VMwareProtectionSource.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this protection source Vm ware protection source based on the context it is used -func (m *ProtectionSourceVMWareProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with VMwareProtectionSource - if err := m.VMwareProtectionSource.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionSourceVMWareProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionSourceVMWareProtectionSource) UnmarshalBinary(b []byte) error { - var res ProtectionSourceVMWareProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_sources_job_runs_report_element.go b/v1/models/protection_sources_job_runs_report_element.go index e25766d7..9da04199 100644 --- a/v1/models/protection_sources_job_runs_report_element.go +++ b/v1/models/protection_sources_job_runs_report_element.go @@ -21,8 +21,10 @@ import ( // swagger:model ProtectionSourcesJobRunsReportElement type ProtectionSourcesJobRunsReportElement struct { - // protection source - ProtectionSource *ProtectionSourcesJobRunsReportElementProtectionSource `json:"protectionSource,omitempty"` + // Specifies the leaf Protection Source Object such as a VM. + ProtectionSource struct { + ProtectionSource + } `json:"protectionSource,omitempty"` // Array of Snapshots // @@ -54,17 +56,6 @@ func (m *ProtectionSourcesJobRunsReportElement) validateProtectionSource(formats return nil } - if m.ProtectionSource != nil { - if err := m.ProtectionSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectionSource") - } - return err - } - } - return nil } @@ -114,22 +105,6 @@ func (m *ProtectionSourcesJobRunsReportElement) ContextValidate(ctx context.Cont func (m *ProtectionSourcesJobRunsReportElement) contextValidateProtectionSource(ctx context.Context, formats strfmt.Registry) error { - if m.ProtectionSource != nil { - - if swag.IsZero(m.ProtectionSource) { // not required - return nil - } - - if err := m.ProtectionSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectionSource") - } - return err - } - } - return nil } diff --git a/v1/models/protection_sources_job_runs_report_element_protection_source.go b/v1/models/protection_sources_job_runs_report_element_protection_source.go deleted file mode 100644 index 0c46e3e4..00000000 --- a/v1/models/protection_sources_job_runs_report_element_protection_source.go +++ /dev/null @@ -1,93 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionSourcesJobRunsReportElementProtectionSource Specifies the leaf Protection Source Object such as a VM. -// -// swagger:model protectionSourcesJobRunsReportElementProtectionSource -type ProtectionSourcesJobRunsReportElementProtectionSource struct { - ProtectionSource -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ProtectionSourcesJobRunsReportElementProtectionSource) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 ProtectionSource - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.ProtectionSource = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ProtectionSourcesJobRunsReportElementProtectionSource) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.ProtectionSource) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this protection sources job runs report element protection source -func (m *ProtectionSourcesJobRunsReportElementProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ProtectionSource - if err := m.ProtectionSource.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this protection sources job runs report element protection source based on the context it is used -func (m *ProtectionSourcesJobRunsReportElementProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ProtectionSource - if err := m.ProtectionSource.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionSourcesJobRunsReportElementProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionSourcesJobRunsReportElementProtectionSource) UnmarshalBinary(b []byte) error { - var res ProtectionSourcesJobRunsReportElementProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/protection_sources_summary_stats.go b/v1/models/protection_sources_summary_stats.go index 1a745c34..bb2d08a8 100644 --- a/v1/models/protection_sources_summary_stats.go +++ b/v1/models/protection_sources_summary_stats.go @@ -111,8 +111,12 @@ type ProtectionSourcesSummaryStats struct { // of this Protection Source Object. NumWarnings *int32 `json:"numWarnings,omitempty"` - // protection source - ProtectionSource *ProtectionSourcesSummaryStatsProtectionSource `json:"protectionSource,omitempty"` + // Specifies the leaf Protection Source Object (such as VM). + // Snapshot summary statistics are reported for this Protection Source + // Object. + ProtectionSource struct { + ProtectionSource + } `json:"protectionSource,omitempty"` // Specifies the name of the Registered Source that is the top level // parent of the specified Protection Source Object. @@ -253,17 +257,6 @@ func (m *ProtectionSourcesSummaryStats) validateProtectionSource(formats strfmt. return nil } - if m.ProtectionSource != nil { - if err := m.ProtectionSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectionSource") - } - return err - } - } - return nil } @@ -313,22 +306,6 @@ func (m *ProtectionSourcesSummaryStats) ContextValidate(ctx context.Context, for func (m *ProtectionSourcesSummaryStats) contextValidateProtectionSource(ctx context.Context, formats strfmt.Registry) error { - if m.ProtectionSource != nil { - - if swag.IsZero(m.ProtectionSource) { // not required - return nil - } - - if err := m.ProtectionSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("protectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("protectionSource") - } - return err - } - } - return nil } diff --git a/v1/models/protection_sources_summary_stats_protection_source.go b/v1/models/protection_sources_summary_stats_protection_source.go deleted file mode 100644 index 81fe7a10..00000000 --- a/v1/models/protection_sources_summary_stats_protection_source.go +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtectionSourcesSummaryStatsProtectionSource Specifies the leaf Protection Source Object (such as VM). -// Snapshot summary statistics are reported for this Protection Source -// Object. -// -// swagger:model protectionSourcesSummaryStatsProtectionSource -type ProtectionSourcesSummaryStatsProtectionSource struct { - ProtectionSource -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ProtectionSourcesSummaryStatsProtectionSource) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 ProtectionSource - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.ProtectionSource = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ProtectionSourcesSummaryStatsProtectionSource) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.ProtectionSource) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this protection sources summary stats protection source -func (m *ProtectionSourcesSummaryStatsProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ProtectionSource - if err := m.ProtectionSource.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this protection sources summary stats protection source based on the context it is used -func (m *ProtectionSourcesSummaryStatsProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ProtectionSource - if err := m.ProtectionSource.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ProtectionSourcesSummaryStatsProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtectionSourcesSummaryStatsProtectionSource) UnmarshalBinary(b []byte) error { - var res ProtectionSourcesSummaryStatsProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/register_protection_source_parameters.go b/v1/models/register_protection_source_parameters.go index 0f8c415d..21111775 100644 --- a/v1/models/register_protection_source_parameters.go +++ b/v1/models/register_protection_source_parameters.go @@ -221,8 +221,13 @@ type RegisterProtectionSourceParameters struct { // Enum: ["kOVirtManager"] KvmType *string `json:"kvmType,omitempty"` - // nas mount credentials - NasMountCredentials *RegisterProtectionSourceParametersNasMountCredentials `json:"nasMountCredentials,omitempty"` + // NAS Server Credentials. + // + // Specifies the server credentials to connect to a NetApp server. + // This field is required for mounting SMB volumes on NetApp servers. + NasMountCredentials struct { + NasMountCredentialParams + } `json:"nasMountCredentials,omitempty"` // Specifies the entity type such as 'kCluster,' if the environment is // kNetapp. @@ -304,8 +309,10 @@ type RegisterProtectionSourceParameters struct { // input fields. All other fields provided as input will be ignored. Subnets []*Subnet `json:"subnets"` - // throttling policy - ThrottlingPolicy *RegisterProtectionSourceParametersThrottlingPolicy `json:"throttlingPolicy,omitempty"` + // Specifies the throttling policy that should be applied to this Source. + ThrottlingPolicy struct { + ThrottlingPolicyParameters + } `json:"throttlingPolicy,omitempty"` // Array of Throttling Policy Overrides for Datastores. // @@ -1147,17 +1154,6 @@ func (m *RegisterProtectionSourceParameters) validateNasMountCredentials(formats return nil } - if m.NasMountCredentials != nil { - if err := m.NasMountCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nasMountCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nasMountCredentials") - } - return err - } - } - return nil } @@ -1480,17 +1476,6 @@ func (m *RegisterProtectionSourceParameters) validateThrottlingPolicy(formats st return nil } - if m.ThrottlingPolicy != nil { - if err := m.ThrottlingPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("throttlingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("throttlingPolicy") - } - return err - } - } - return nil } @@ -1905,22 +1890,6 @@ func (m *RegisterProtectionSourceParameters) contextValidateKubernetesParams(ctx func (m *RegisterProtectionSourceParameters) contextValidateNasMountCredentials(ctx context.Context, formats strfmt.Registry) error { - if m.NasMountCredentials != nil { - - if swag.IsZero(m.NasMountCredentials) { // not required - return nil - } - - if err := m.NasMountCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nasMountCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nasMountCredentials") - } - return err - } - } - return nil } @@ -2043,22 +2012,6 @@ func (m *RegisterProtectionSourceParameters) contextValidateSubnets(ctx context. func (m *RegisterProtectionSourceParameters) contextValidateThrottlingPolicy(ctx context.Context, formats strfmt.Registry) error { - if m.ThrottlingPolicy != nil { - - if swag.IsZero(m.ThrottlingPolicy) { // not required - return nil - } - - if err := m.ThrottlingPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("throttlingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("throttlingPolicy") - } - return err - } - } - return nil } diff --git a/v1/models/register_protection_source_parameters_nas_mount_credentials.go b/v1/models/register_protection_source_parameters_nas_mount_credentials.go deleted file mode 100644 index 6d655e82..00000000 --- a/v1/models/register_protection_source_parameters_nas_mount_credentials.go +++ /dev/null @@ -1,96 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RegisterProtectionSourceParametersNasMountCredentials NAS Server Credentials. -// -// Specifies the server credentials to connect to a NetApp server. -// This field is required for mounting SMB volumes on NetApp servers. -// -// swagger:model registerProtectionSourceParametersNasMountCredentials -type RegisterProtectionSourceParametersNasMountCredentials struct { - NasMountCredentialParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *RegisterProtectionSourceParametersNasMountCredentials) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 NasMountCredentialParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.NasMountCredentialParams = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m RegisterProtectionSourceParametersNasMountCredentials) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.NasMountCredentialParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this register protection source parameters nas mount credentials -func (m *RegisterProtectionSourceParametersNasMountCredentials) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with NasMountCredentialParams - if err := m.NasMountCredentialParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this register protection source parameters nas mount credentials based on the context it is used -func (m *RegisterProtectionSourceParametersNasMountCredentials) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with NasMountCredentialParams - if err := m.NasMountCredentialParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *RegisterProtectionSourceParametersNasMountCredentials) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RegisterProtectionSourceParametersNasMountCredentials) UnmarshalBinary(b []byte) error { - var res RegisterProtectionSourceParametersNasMountCredentials - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/register_protection_source_parameters_throttling_policy.go b/v1/models/register_protection_source_parameters_throttling_policy.go deleted file mode 100644 index 69ee979d..00000000 --- a/v1/models/register_protection_source_parameters_throttling_policy.go +++ /dev/null @@ -1,93 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RegisterProtectionSourceParametersThrottlingPolicy Specifies the throttling policy that should be applied to this Source. -// -// swagger:model registerProtectionSourceParametersThrottlingPolicy -type RegisterProtectionSourceParametersThrottlingPolicy struct { - ThrottlingPolicyParameters -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *RegisterProtectionSourceParametersThrottlingPolicy) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 ThrottlingPolicyParameters - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.ThrottlingPolicyParameters = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m RegisterProtectionSourceParametersThrottlingPolicy) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.ThrottlingPolicyParameters) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this register protection source parameters throttling policy -func (m *RegisterProtectionSourceParametersThrottlingPolicy) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ThrottlingPolicyParameters - if err := m.ThrottlingPolicyParameters.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this register protection source parameters throttling policy based on the context it is used -func (m *RegisterProtectionSourceParametersThrottlingPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ThrottlingPolicyParameters - if err := m.ThrottlingPolicyParameters.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *RegisterProtectionSourceParametersThrottlingPolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RegisterProtectionSourceParametersThrottlingPolicy) UnmarshalBinary(b []byte) error { - var res RegisterProtectionSourceParametersThrottlingPolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/registered_application_server.go b/v1/models/registered_application_server.go index fd67171a..0f4e50fd 100644 --- a/v1/models/registered_application_server.go +++ b/v1/models/registered_application_server.go @@ -21,11 +21,22 @@ import ( // swagger:model RegisteredApplicationServer type RegisteredApplicationServer struct { - // application server - ApplicationServer *RegisteredApplicationServerApplicationServer `json:"applicationServer,omitempty"` - - // registered protection source - RegisteredProtectionSource *RegisteredApplicationServerRegisteredProtectionSource `json:"registeredProtectionSource,omitempty"` + // Application Server and the subtrees below them. + // + // Specifies the child subtree used to store additional application-level + // Objects. + // Different environments use the subtree to store application-level + // information. For example for SQL Server, this subtree stores the + // SQL Server instances running on a VM. + ApplicationServer struct { + ProtectionSourceNode + } `json:"applicationServer,omitempty"` + + // Specifies the Protection Source like a VM or Physical Server that + // registered the Application Server. + RegisteredProtectionSource struct { + ProtectionSource + } `json:"registeredProtectionSource,omitempty"` } // Validate validates this registered application server @@ -51,17 +62,6 @@ func (m *RegisteredApplicationServer) validateApplicationServer(formats strfmt.R return nil } - if m.ApplicationServer != nil { - if err := m.ApplicationServer.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("applicationServer") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("applicationServer") - } - return err - } - } - return nil } @@ -70,17 +70,6 @@ func (m *RegisteredApplicationServer) validateRegisteredProtectionSource(formats return nil } - if m.RegisteredProtectionSource != nil { - if err := m.RegisteredProtectionSource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("registeredProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("registeredProtectionSource") - } - return err - } - } - return nil } @@ -104,43 +93,11 @@ func (m *RegisteredApplicationServer) ContextValidate(ctx context.Context, forma func (m *RegisteredApplicationServer) contextValidateApplicationServer(ctx context.Context, formats strfmt.Registry) error { - if m.ApplicationServer != nil { - - if swag.IsZero(m.ApplicationServer) { // not required - return nil - } - - if err := m.ApplicationServer.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("applicationServer") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("applicationServer") - } - return err - } - } - return nil } func (m *RegisteredApplicationServer) contextValidateRegisteredProtectionSource(ctx context.Context, formats strfmt.Registry) error { - if m.RegisteredProtectionSource != nil { - - if swag.IsZero(m.RegisteredProtectionSource) { // not required - return nil - } - - if err := m.RegisteredProtectionSource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("registeredProtectionSource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("registeredProtectionSource") - } - return err - } - } - return nil } diff --git a/v1/models/registered_application_server_application_server.go b/v1/models/registered_application_server_application_server.go deleted file mode 100644 index fd4d39b6..00000000 --- a/v1/models/registered_application_server_application_server.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RegisteredApplicationServerApplicationServer Application Server and the subtrees below them. -// -// Specifies the child subtree used to store additional application-level -// Objects. -// Different environments use the subtree to store application-level -// information. For example for SQL Server, this subtree stores the -// SQL Server instances running on a VM. -// -// swagger:model registeredApplicationServerApplicationServer -type RegisteredApplicationServerApplicationServer struct { - ProtectionSourceNode -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *RegisteredApplicationServerApplicationServer) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 ProtectionSourceNode - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.ProtectionSourceNode = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m RegisteredApplicationServerApplicationServer) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.ProtectionSourceNode) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this registered application server application server -func (m *RegisteredApplicationServerApplicationServer) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ProtectionSourceNode - if err := m.ProtectionSourceNode.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this registered application server application server based on the context it is used -func (m *RegisteredApplicationServerApplicationServer) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ProtectionSourceNode - if err := m.ProtectionSourceNode.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *RegisteredApplicationServerApplicationServer) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RegisteredApplicationServerApplicationServer) UnmarshalBinary(b []byte) error { - var res RegisteredApplicationServerApplicationServer - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/registered_application_server_registered_protection_source.go b/v1/models/registered_application_server_registered_protection_source.go deleted file mode 100644 index cf442564..00000000 --- a/v1/models/registered_application_server_registered_protection_source.go +++ /dev/null @@ -1,94 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RegisteredApplicationServerRegisteredProtectionSource Specifies the Protection Source like a VM or Physical Server that -// registered the Application Server. -// -// swagger:model registeredApplicationServerRegisteredProtectionSource -type RegisteredApplicationServerRegisteredProtectionSource struct { - ProtectionSource -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *RegisteredApplicationServerRegisteredProtectionSource) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 ProtectionSource - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.ProtectionSource = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m RegisteredApplicationServerRegisteredProtectionSource) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.ProtectionSource) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this registered application server registered protection source -func (m *RegisteredApplicationServerRegisteredProtectionSource) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ProtectionSource - if err := m.ProtectionSource.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this registered application server registered protection source based on the context it is used -func (m *RegisteredApplicationServerRegisteredProtectionSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ProtectionSource - if err := m.ProtectionSource.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *RegisteredApplicationServerRegisteredProtectionSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RegisteredApplicationServerRegisteredProtectionSource) UnmarshalBinary(b []byte) error { - var res RegisteredApplicationServerRegisteredProtectionSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/registered_entity_o365_params.go b/v1/models/registered_entity_o365_params.go index 87c9cd13..b78de1d8 100644 --- a/v1/models/registered_entity_o365_params.go +++ b/v1/models/registered_entity_o365_params.go @@ -23,7 +23,7 @@ type RegisteredEntityO365Params struct { // Teams & Public Folders are supported. If this is not specified then all // entities will be discovered. // - // For discovery of only kUser & kSite entities, this vec should be + // Example: For discovery of only kUser & kSite entities, this vec should be // set to [kUsers, kSites]. DiscoverableEntityTypeVec []int32 `json:"discoverableEntityTypeVec"` diff --git a/v1/models/registered_source_info.go b/v1/models/registered_source_info.go index f083155b..8c2558a0 100644 --- a/v1/models/registered_source_info.go +++ b/v1/models/registered_source_info.go @@ -167,8 +167,13 @@ type RegisteredSourceInfo struct { // the MongoDB source. MongodbParams *MongoDBConnectParams `json:"mongodbParams,omitempty"` - // nas mount credentials - NasMountCredentials *RegisteredSourceInfoNasMountCredentials `json:"nasMountCredentials,omitempty"` + // NAS Server Credentials. + // + // Specifies the credentials required to mount directories on the NetApp + // server if given. + NasMountCredentials struct { + NasMountCredentialParams + } `json:"nasMountCredentials,omitempty"` // Contains all the additional params specified by the user while registering // the Office 365 source. @@ -607,17 +612,6 @@ func (m *RegisteredSourceInfo) validateNasMountCredentials(formats strfmt.Regist return nil } - if m.NasMountCredentials != nil { - if err := m.NasMountCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nasMountCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nasMountCredentials") - } - return err - } - } - return nil } @@ -1125,22 +1119,6 @@ func (m *RegisteredSourceInfo) contextValidateMongodbParams(ctx context.Context, func (m *RegisteredSourceInfo) contextValidateNasMountCredentials(ctx context.Context, formats strfmt.Registry) error { - if m.NasMountCredentials != nil { - - if swag.IsZero(m.NasMountCredentials) { // not required - return nil - } - - if err := m.NasMountCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nasMountCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nasMountCredentials") - } - return err - } - } - return nil } diff --git a/v1/models/registered_source_info_nas_mount_credentials.go b/v1/models/registered_source_info_nas_mount_credentials.go deleted file mode 100644 index 9d13b17f..00000000 --- a/v1/models/registered_source_info_nas_mount_credentials.go +++ /dev/null @@ -1,96 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RegisteredSourceInfoNasMountCredentials NAS Server Credentials. -// -// Specifies the credentials required to mount directories on the NetApp -// server if given. -// -// swagger:model registeredSourceInfoNasMountCredentials -type RegisteredSourceInfoNasMountCredentials struct { - NasMountCredentialParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *RegisteredSourceInfoNasMountCredentials) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 NasMountCredentialParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.NasMountCredentialParams = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m RegisteredSourceInfoNasMountCredentials) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.NasMountCredentialParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this registered source info nas mount credentials -func (m *RegisteredSourceInfoNasMountCredentials) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with NasMountCredentialParams - if err := m.NasMountCredentialParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this registered source info nas mount credentials based on the context it is used -func (m *RegisteredSourceInfoNasMountCredentials) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with NasMountCredentialParams - if err := m.NasMountCredentialParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *RegisteredSourceInfoNasMountCredentials) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RegisteredSourceInfoNasMountCredentials) UnmarshalBinary(b []byte) error { - var res RegisteredSourceInfoNasMountCredentials - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/remote_job_script.go b/v1/models/remote_job_script.go index 3067d223..8c940410 100644 --- a/v1/models/remote_job_script.go +++ b/v1/models/remote_job_script.go @@ -21,17 +21,45 @@ import ( // swagger:model RemoteJobScript type RemoteJobScript struct { - // full backup script - FullBackupScript *RemoteJobScriptFullBackupScript `json:"fullBackupScript,omitempty"` - - // incremental backup script - IncrementalBackupScript *RemoteJobScriptIncrementalBackupScript `json:"incrementalBackupScript,omitempty"` - - // log backup script - LogBackupScript *RemoteJobScriptLogBackupScript `json:"logBackupScript,omitempty"` - - // remote host - RemoteHost *RemoteJobScriptRemoteHost `json:"remoteHost,omitempty"` + // Full (No CBT) Script. + // + // Specifies the script that should run for the Full (no CBT) backup schedule + // of a Remote Adapter 'kPuppeteer' Job. + // This field is mandatory if the Policy associated with this Job + // has a Full (no CBT) backup schedule and this is Remote Adapter + // 'kPuppeteer' Job. + FullBackupScript struct { + RemoteScriptPathAndParams + } `json:"fullBackupScript,omitempty"` + + // CBT-based Script. + // + // Specifies the script that should run for the CBT-based backup + // schedule of a Remote Adapter 'kPuppeteer' Job. A CBT-based backup + // schedule is utilizing Change Block Tracking when capturing Snapshots. + // This field is mandatory if the Policy associated with this Job + // has a CBT-based backup schedule and this is Remote Adapter + // 'kPuppeteer' Job. + IncrementalBackupScript struct { + RemoteScriptPathAndParams + } `json:"incrementalBackupScript,omitempty"` + + // Log Script. + // + // Specifies the script that should run for the Log backup schedule + // of a Remote Adapter 'kPuppeteer' Job. + // This field is mandatory if the Policy associated with this Job + // has a Log backup schedule and this is Remote Adapter + // 'kPuppeteer' Job. + LogBackupScript struct { + RemoteScriptPathAndParams + } `json:"logBackupScript,omitempty"` + + // Specifies the remote host where the remote scripts are executed. + // This field must be set for Remote Adapter Jobs. + RemoteHost struct { + RemoteHost + } `json:"remoteHost,omitempty"` // Specifies the username that will be used to login to the remote host. // For host type 'kLinux', it is expected that user has setup the @@ -70,17 +98,6 @@ func (m *RemoteJobScript) validateFullBackupScript(formats strfmt.Registry) erro return nil } - if m.FullBackupScript != nil { - if err := m.FullBackupScript.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fullBackupScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fullBackupScript") - } - return err - } - } - return nil } @@ -89,17 +106,6 @@ func (m *RemoteJobScript) validateIncrementalBackupScript(formats strfmt.Registr return nil } - if m.IncrementalBackupScript != nil { - if err := m.IncrementalBackupScript.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("incrementalBackupScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("incrementalBackupScript") - } - return err - } - } - return nil } @@ -108,17 +114,6 @@ func (m *RemoteJobScript) validateLogBackupScript(formats strfmt.Registry) error return nil } - if m.LogBackupScript != nil { - if err := m.LogBackupScript.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("logBackupScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("logBackupScript") - } - return err - } - } - return nil } @@ -127,17 +122,6 @@ func (m *RemoteJobScript) validateRemoteHost(formats strfmt.Registry) error { return nil } - if m.RemoteHost != nil { - if err := m.RemoteHost.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("remoteHost") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("remoteHost") - } - return err - } - } - return nil } @@ -169,85 +153,21 @@ func (m *RemoteJobScript) ContextValidate(ctx context.Context, formats strfmt.Re func (m *RemoteJobScript) contextValidateFullBackupScript(ctx context.Context, formats strfmt.Registry) error { - if m.FullBackupScript != nil { - - if swag.IsZero(m.FullBackupScript) { // not required - return nil - } - - if err := m.FullBackupScript.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fullBackupScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fullBackupScript") - } - return err - } - } - return nil } func (m *RemoteJobScript) contextValidateIncrementalBackupScript(ctx context.Context, formats strfmt.Registry) error { - if m.IncrementalBackupScript != nil { - - if swag.IsZero(m.IncrementalBackupScript) { // not required - return nil - } - - if err := m.IncrementalBackupScript.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("incrementalBackupScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("incrementalBackupScript") - } - return err - } - } - return nil } func (m *RemoteJobScript) contextValidateLogBackupScript(ctx context.Context, formats strfmt.Registry) error { - if m.LogBackupScript != nil { - - if swag.IsZero(m.LogBackupScript) { // not required - return nil - } - - if err := m.LogBackupScript.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("logBackupScript") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("logBackupScript") - } - return err - } - } - return nil } func (m *RemoteJobScript) contextValidateRemoteHost(ctx context.Context, formats strfmt.Registry) error { - if m.RemoteHost != nil { - - if swag.IsZero(m.RemoteHost) { // not required - return nil - } - - if err := m.RemoteHost.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("remoteHost") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("remoteHost") - } - return err - } - } - return nil } diff --git a/v1/models/remote_job_script_full_backup_script.go b/v1/models/remote_job_script_full_backup_script.go deleted file mode 100644 index 5f53bb01..00000000 --- a/v1/models/remote_job_script_full_backup_script.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RemoteJobScriptFullBackupScript Full (No CBT) Script. -// -// Specifies the script that should run for the Full (no CBT) backup schedule -// of a Remote Adapter 'kPuppeteer' Job. -// This field is mandatory if the Policy associated with this Job -// has a Full (no CBT) backup schedule and this is Remote Adapter -// 'kPuppeteer' Job. -// -// swagger:model remoteJobScriptFullBackupScript -type RemoteJobScriptFullBackupScript struct { - RemoteScriptPathAndParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *RemoteJobScriptFullBackupScript) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 RemoteScriptPathAndParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.RemoteScriptPathAndParams = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m RemoteJobScriptFullBackupScript) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.RemoteScriptPathAndParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this remote job script full backup script -func (m *RemoteJobScriptFullBackupScript) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with RemoteScriptPathAndParams - if err := m.RemoteScriptPathAndParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this remote job script full backup script based on the context it is used -func (m *RemoteJobScriptFullBackupScript) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with RemoteScriptPathAndParams - if err := m.RemoteScriptPathAndParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *RemoteJobScriptFullBackupScript) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RemoteJobScriptFullBackupScript) UnmarshalBinary(b []byte) error { - var res RemoteJobScriptFullBackupScript - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/remote_job_script_incremental_backup_script.go b/v1/models/remote_job_script_incremental_backup_script.go deleted file mode 100644 index 9077670c..00000000 --- a/v1/models/remote_job_script_incremental_backup_script.go +++ /dev/null @@ -1,100 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RemoteJobScriptIncrementalBackupScript CBT-based Script. -// -// Specifies the script that should run for the CBT-based backup -// schedule of a Remote Adapter 'kPuppeteer' Job. A CBT-based backup -// schedule is utilizing Change Block Tracking when capturing Snapshots. -// This field is mandatory if the Policy associated with this Job -// has a CBT-based backup schedule and this is Remote Adapter -// 'kPuppeteer' Job. -// -// swagger:model remoteJobScriptIncrementalBackupScript -type RemoteJobScriptIncrementalBackupScript struct { - RemoteScriptPathAndParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *RemoteJobScriptIncrementalBackupScript) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 RemoteScriptPathAndParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.RemoteScriptPathAndParams = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m RemoteJobScriptIncrementalBackupScript) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.RemoteScriptPathAndParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this remote job script incremental backup script -func (m *RemoteJobScriptIncrementalBackupScript) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with RemoteScriptPathAndParams - if err := m.RemoteScriptPathAndParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this remote job script incremental backup script based on the context it is used -func (m *RemoteJobScriptIncrementalBackupScript) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with RemoteScriptPathAndParams - if err := m.RemoteScriptPathAndParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *RemoteJobScriptIncrementalBackupScript) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RemoteJobScriptIncrementalBackupScript) UnmarshalBinary(b []byte) error { - var res RemoteJobScriptIncrementalBackupScript - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/remote_job_script_log_backup_script.go b/v1/models/remote_job_script_log_backup_script.go deleted file mode 100644 index fcf1775d..00000000 --- a/v1/models/remote_job_script_log_backup_script.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RemoteJobScriptLogBackupScript Log Script. -// -// Specifies the script that should run for the Log backup schedule -// of a Remote Adapter 'kPuppeteer' Job. -// This field is mandatory if the Policy associated with this Job -// has a Log backup schedule and this is Remote Adapter -// 'kPuppeteer' Job. -// -// swagger:model remoteJobScriptLogBackupScript -type RemoteJobScriptLogBackupScript struct { - RemoteScriptPathAndParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *RemoteJobScriptLogBackupScript) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 RemoteScriptPathAndParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.RemoteScriptPathAndParams = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m RemoteJobScriptLogBackupScript) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.RemoteScriptPathAndParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this remote job script log backup script -func (m *RemoteJobScriptLogBackupScript) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with RemoteScriptPathAndParams - if err := m.RemoteScriptPathAndParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this remote job script log backup script based on the context it is used -func (m *RemoteJobScriptLogBackupScript) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with RemoteScriptPathAndParams - if err := m.RemoteScriptPathAndParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *RemoteJobScriptLogBackupScript) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RemoteJobScriptLogBackupScript) UnmarshalBinary(b []byte) error { - var res RemoteJobScriptLogBackupScript - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/remote_job_script_remote_host.go b/v1/models/remote_job_script_remote_host.go deleted file mode 100644 index 2f4b6862..00000000 --- a/v1/models/remote_job_script_remote_host.go +++ /dev/null @@ -1,94 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RemoteJobScriptRemoteHost Specifies the remote host where the remote scripts are executed. -// This field must be set for Remote Adapter Jobs. -// -// swagger:model remoteJobScriptRemoteHost -type RemoteJobScriptRemoteHost struct { - RemoteHost -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *RemoteJobScriptRemoteHost) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 RemoteHost - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.RemoteHost = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m RemoteJobScriptRemoteHost) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.RemoteHost) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this remote job script remote host -func (m *RemoteJobScriptRemoteHost) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with RemoteHost - if err := m.RemoteHost.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this remote job script remote host based on the context it is used -func (m *RemoteJobScriptRemoteHost) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with RemoteHost - if err := m.RemoteHost.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *RemoteJobScriptRemoteHost) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RemoteJobScriptRemoteHost) UnmarshalBinary(b []byte) error { - var res RemoteJobScriptRemoteHost - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/remote_protection_job_information.go b/v1/models/remote_protection_job_information.go index aaf89433..173429d8 100644 --- a/v1/models/remote_protection_job_information.go +++ b/v1/models/remote_protection_job_information.go @@ -86,8 +86,14 @@ type RemoteProtectionJobInformation struct { // Specifies the name of the Protection Job on the original Cluster. JobName *string `json:"jobName,omitempty"` - // job Uid - JobUID *RemoteProtectionJobInformationJobUID `json:"jobUid,omitempty"` + // Protection Job Uid. + // + // Specifies the globally unique id of the original Protection Job + // that archived the data to the Vault. This id is assigned by the + // original Cluster that archived the data. + JobUID struct { + UniversalID + } `json:"jobUid,omitempty"` } // Validate validates this remote protection job information @@ -290,17 +296,6 @@ func (m *RemoteProtectionJobInformation) validateJobUID(formats strfmt.Registry) return nil } - if m.JobUID != nil { - if err := m.JobUID.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("jobUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("jobUid") - } - return err - } - } - return nil } @@ -320,22 +315,6 @@ func (m *RemoteProtectionJobInformation) ContextValidate(ctx context.Context, fo func (m *RemoteProtectionJobInformation) contextValidateJobUID(ctx context.Context, formats strfmt.Registry) error { - if m.JobUID != nil { - - if swag.IsZero(m.JobUID) { // not required - return nil - } - - if err := m.JobUID.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("jobUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("jobUid") - } - return err - } - } - return nil } diff --git a/v1/models/remote_protection_job_information_job_uid.go b/v1/models/remote_protection_job_information_job_uid.go deleted file mode 100644 index 688406b3..00000000 --- a/v1/models/remote_protection_job_information_job_uid.go +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RemoteProtectionJobInformationJobUID Protection Job Uid. -// -// Specifies the globally unique id of the original Protection Job -// that archived the data to the Vault. This id is assigned by the -// original Cluster that archived the data. -// -// swagger:model remoteProtectionJobInformationJobUid -type RemoteProtectionJobInformationJobUID struct { - UniversalID -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *RemoteProtectionJobInformationJobUID) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 UniversalID - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.UniversalID = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m RemoteProtectionJobInformationJobUID) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.UniversalID) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this remote protection job information job Uid -func (m *RemoteProtectionJobInformationJobUID) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UniversalID - if err := m.UniversalID.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this remote protection job information job Uid based on the context it is used -func (m *RemoteProtectionJobInformationJobUID) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UniversalID - if err := m.UniversalID.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *RemoteProtectionJobInformationJobUID) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RemoteProtectionJobInformationJobUID) UnmarshalBinary(b []byte) error { - var res RemoteProtectionJobInformationJobUID - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/remote_protection_job_run_information.go b/v1/models/remote_protection_job_run_information.go index 14fa5c84..901169ec 100644 --- a/v1/models/remote_protection_job_run_information.go +++ b/v1/models/remote_protection_job_run_information.go @@ -86,8 +86,14 @@ type RemoteProtectionJobRunInformation struct { // Specifies the name of the Protection Job on the original Cluster. JobName *string `json:"jobName,omitempty"` - // job Uid - JobUID *RemoteProtectionJobRunInformationJobUID `json:"jobUid,omitempty"` + // Protection Job Uid. + // + // Specifies the globally unique id of the original Protection Job + // that archived the data to the Vault. This id is assigned by the + // original Cluster that archived the data. + JobUID struct { + UniversalID + } `json:"jobUid,omitempty"` // Array of Protection Job Run Details. // @@ -300,17 +306,6 @@ func (m *RemoteProtectionJobRunInformation) validateJobUID(formats strfmt.Regist return nil } - if m.JobUID != nil { - if err := m.JobUID.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("jobUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("jobUid") - } - return err - } - } - return nil } @@ -360,22 +355,6 @@ func (m *RemoteProtectionJobRunInformation) ContextValidate(ctx context.Context, func (m *RemoteProtectionJobRunInformation) contextValidateJobUID(ctx context.Context, formats strfmt.Registry) error { - if m.JobUID != nil { - - if swag.IsZero(m.JobUID) { // not required - return nil - } - - if err := m.JobUID.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("jobUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("jobUid") - } - return err - } - } - return nil } diff --git a/v1/models/remote_protection_job_run_information_job_uid.go b/v1/models/remote_protection_job_run_information_job_uid.go deleted file mode 100644 index 47cf32e4..00000000 --- a/v1/models/remote_protection_job_run_information_job_uid.go +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RemoteProtectionJobRunInformationJobUID Protection Job Uid. -// -// Specifies the globally unique id of the original Protection Job -// that archived the data to the Vault. This id is assigned by the -// original Cluster that archived the data. -// -// swagger:model remoteProtectionJobRunInformationJobUid -type RemoteProtectionJobRunInformationJobUID struct { - UniversalID -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *RemoteProtectionJobRunInformationJobUID) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 UniversalID - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.UniversalID = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m RemoteProtectionJobRunInformationJobUID) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.UniversalID) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this remote protection job run information job Uid -func (m *RemoteProtectionJobRunInformationJobUID) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UniversalID - if err := m.UniversalID.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this remote protection job run information job Uid based on the context it is used -func (m *RemoteProtectionJobRunInformationJobUID) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UniversalID - if err := m.UniversalID.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *RemoteProtectionJobRunInformationJobUID) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RemoteProtectionJobRunInformationJobUID) UnmarshalBinary(b []byte) error { - var res RemoteProtectionJobRunInformationJobUID - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/remote_protection_job_run_instance.go b/v1/models/remote_protection_job_run_instance.go index 3e655bcd..31cd914f 100644 --- a/v1/models/remote_protection_job_run_instance.go +++ b/v1/models/remote_protection_job_run_instance.go @@ -23,8 +23,13 @@ import ( // swagger:model RemoteProtectionJobRunInstance type RemoteProtectionJobRunInstance struct { - // archive task Uid - ArchiveTaskUID *RemoteProtectionJobRunInstanceArchiveTaskUID `json:"archiveTaskUid,omitempty"` + // Archive Task Uid. + // + // Specifies the globally unique id of the archival task that archived + // the Snapshot to the Vault. + ArchiveTaskUID struct { + UniversalID + } `json:"archiveTaskUid,omitempty"` // Specifies the version of the archive. ArchiveVersion *int32 `json:"archiveVersion,omitempty"` @@ -84,17 +89,6 @@ func (m *RemoteProtectionJobRunInstance) validateArchiveTaskUID(formats strfmt.R return nil } - if m.ArchiveTaskUID != nil { - if err := m.ArchiveTaskUID.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("archiveTaskUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("archiveTaskUid") - } - return err - } - } - return nil } @@ -162,22 +156,6 @@ func (m *RemoteProtectionJobRunInstance) ContextValidate(ctx context.Context, fo func (m *RemoteProtectionJobRunInstance) contextValidateArchiveTaskUID(ctx context.Context, formats strfmt.Registry) error { - if m.ArchiveTaskUID != nil { - - if swag.IsZero(m.ArchiveTaskUID) { // not required - return nil - } - - if err := m.ArchiveTaskUID.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("archiveTaskUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("archiveTaskUid") - } - return err - } - } - return nil } diff --git a/v1/models/remote_protection_job_run_instance_archive_task_uid.go b/v1/models/remote_protection_job_run_instance_archive_task_uid.go deleted file mode 100644 index 6ad8fd3c..00000000 --- a/v1/models/remote_protection_job_run_instance_archive_task_uid.go +++ /dev/null @@ -1,96 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RemoteProtectionJobRunInstanceArchiveTaskUID Archive Task Uid. -// -// Specifies the globally unique id of the archival task that archived -// the Snapshot to the Vault. -// -// swagger:model remoteProtectionJobRunInstanceArchiveTaskUid -type RemoteProtectionJobRunInstanceArchiveTaskUID struct { - UniversalID -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *RemoteProtectionJobRunInstanceArchiveTaskUID) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 UniversalID - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.UniversalID = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m RemoteProtectionJobRunInstanceArchiveTaskUID) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.UniversalID) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this remote protection job run instance archive task Uid -func (m *RemoteProtectionJobRunInstanceArchiveTaskUID) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UniversalID - if err := m.UniversalID.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this remote protection job run instance archive task Uid based on the context it is used -func (m *RemoteProtectionJobRunInstanceArchiveTaskUID) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UniversalID - if err := m.UniversalID.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *RemoteProtectionJobRunInstanceArchiveTaskUID) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RemoteProtectionJobRunInstanceArchiveTaskUID) UnmarshalBinary(b []byte) error { - var res RemoteProtectionJobRunInstanceArchiveTaskUID - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/remote_restore_indexing_status.go b/v1/models/remote_restore_indexing_status.go index f28cc398..ec72f498 100644 --- a/v1/models/remote_restore_indexing_status.go +++ b/v1/models/remote_restore_indexing_status.go @@ -49,8 +49,12 @@ type RemoteRestoreIndexingStatus struct { // Enum: ["kJobRunning","kJobFinished","kJobFailed","kJobCanceled","kJobPaused"] IndexingTaskStatus *string `json:"indexingTaskStatus,omitempty"` - // indexing task Uid - IndexingTaskUID *RemoteRestoreIndexingStatusIndexingTaskUID `json:"indexingTaskUid,omitempty"` + // Indexing Task Uid. + // + // Specifies the unique id of the indexing task assigned by this Cluster. + IndexingTaskUID struct { + UniversalID + } `json:"indexingTaskUid,omitempty"` // For all the Snapshots retrieved by this Job, specifies the latest time // when a Snapshot expires. @@ -141,17 +145,6 @@ func (m *RemoteRestoreIndexingStatus) validateIndexingTaskUID(formats strfmt.Reg return nil } - if m.IndexingTaskUID != nil { - if err := m.IndexingTaskUID.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("indexingTaskUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("indexingTaskUid") - } - return err - } - } - return nil } @@ -171,22 +164,6 @@ func (m *RemoteRestoreIndexingStatus) ContextValidate(ctx context.Context, forma func (m *RemoteRestoreIndexingStatus) contextValidateIndexingTaskUID(ctx context.Context, formats strfmt.Registry) error { - if m.IndexingTaskUID != nil { - - if swag.IsZero(m.IndexingTaskUID) { // not required - return nil - } - - if err := m.IndexingTaskUID.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("indexingTaskUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("indexingTaskUid") - } - return err - } - } - return nil } diff --git a/v1/models/remote_restore_indexing_status_indexing_task_uid.go b/v1/models/remote_restore_indexing_status_indexing_task_uid.go deleted file mode 100644 index 7f256c4d..00000000 --- a/v1/models/remote_restore_indexing_status_indexing_task_uid.go +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RemoteRestoreIndexingStatusIndexingTaskUID Indexing Task Uid. -// -// Specifies the unique id of the indexing task assigned by this Cluster. -// -// swagger:model remoteRestoreIndexingStatusIndexingTaskUid -type RemoteRestoreIndexingStatusIndexingTaskUID struct { - UniversalID -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *RemoteRestoreIndexingStatusIndexingTaskUID) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 UniversalID - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.UniversalID = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m RemoteRestoreIndexingStatusIndexingTaskUID) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.UniversalID) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this remote restore indexing status indexing task Uid -func (m *RemoteRestoreIndexingStatusIndexingTaskUID) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UniversalID - if err := m.UniversalID.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this remote restore indexing status indexing task Uid based on the context it is used -func (m *RemoteRestoreIndexingStatusIndexingTaskUID) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UniversalID - if err := m.UniversalID.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *RemoteRestoreIndexingStatusIndexingTaskUID) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RemoteRestoreIndexingStatusIndexingTaskUID) UnmarshalBinary(b []byte) error { - var res RemoteRestoreIndexingStatusIndexingTaskUID - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/remote_restore_snapshot_status.go b/v1/models/remote_restore_snapshot_status.go index e8fdcfa8..5b0ff702 100644 --- a/v1/models/remote_restore_snapshot_status.go +++ b/v1/models/remote_restore_snapshot_status.go @@ -26,8 +26,13 @@ type RemoteRestoreSnapshotStatus struct { // as a Unix epoch Timestamp (in microseconds). SnapshotTaskStartTimeUsecs *int64 `json:"SnapshotTaskStartTimeUsecs,omitempty"` - // archive task Uid - ArchiveTaskUID *RemoteRestoreSnapshotStatusArchiveTaskUID `json:"archiveTaskUid,omitempty"` + // Archive Task Uid. + // + // Specifies the globally unique id of the archival task that archived + // the Snapshots to the remote Vault. + ArchiveTaskUID struct { + UniversalID + } `json:"archiveTaskUid,omitempty"` // Specifies the error message if the indexing task fails. Error *string `json:"error,omitempty"` @@ -56,8 +61,12 @@ type RemoteRestoreSnapshotStatus struct { // Enum: ["kJobRunning","kJobFinished","kJobFailed","kJobCanceled","kJobPaused"] SnapshotTaskStatus *string `json:"snapshotTaskStatus,omitempty"` - // snapshot task Uid - SnapshotTaskUID *RemoteRestoreSnapshotStatusSnapshotTaskUID `json:"snapshotTaskUid,omitempty"` + // Snapshot Task Uid. + // + // Specifies the globally unique id of the task capturing the Snapshot. + SnapshotTaskUID struct { + UniversalID + } `json:"snapshotTaskUid,omitempty"` // Specify the time the Snapshot was captured. // This time is recorded as a Unix epoch Timestamp (in microseconds). @@ -91,17 +100,6 @@ func (m *RemoteRestoreSnapshotStatus) validateArchiveTaskUID(formats strfmt.Regi return nil } - if m.ArchiveTaskUID != nil { - if err := m.ArchiveTaskUID.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("archiveTaskUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("archiveTaskUid") - } - return err - } - } - return nil } @@ -161,17 +159,6 @@ func (m *RemoteRestoreSnapshotStatus) validateSnapshotTaskUID(formats strfmt.Reg return nil } - if m.SnapshotTaskUID != nil { - if err := m.SnapshotTaskUID.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshotTaskUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshotTaskUid") - } - return err - } - } - return nil } @@ -195,43 +182,11 @@ func (m *RemoteRestoreSnapshotStatus) ContextValidate(ctx context.Context, forma func (m *RemoteRestoreSnapshotStatus) contextValidateArchiveTaskUID(ctx context.Context, formats strfmt.Registry) error { - if m.ArchiveTaskUID != nil { - - if swag.IsZero(m.ArchiveTaskUID) { // not required - return nil - } - - if err := m.ArchiveTaskUID.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("archiveTaskUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("archiveTaskUid") - } - return err - } - } - return nil } func (m *RemoteRestoreSnapshotStatus) contextValidateSnapshotTaskUID(ctx context.Context, formats strfmt.Registry) error { - if m.SnapshotTaskUID != nil { - - if swag.IsZero(m.SnapshotTaskUID) { // not required - return nil - } - - if err := m.SnapshotTaskUID.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshotTaskUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("snapshotTaskUid") - } - return err - } - } - return nil } diff --git a/v1/models/remote_restore_snapshot_status_archive_task_uid.go b/v1/models/remote_restore_snapshot_status_archive_task_uid.go deleted file mode 100644 index ab6e1da5..00000000 --- a/v1/models/remote_restore_snapshot_status_archive_task_uid.go +++ /dev/null @@ -1,96 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RemoteRestoreSnapshotStatusArchiveTaskUID Archive Task Uid. -// -// Specifies the globally unique id of the archival task that archived -// the Snapshots to the remote Vault. -// -// swagger:model remoteRestoreSnapshotStatusArchiveTaskUid -type RemoteRestoreSnapshotStatusArchiveTaskUID struct { - UniversalID -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *RemoteRestoreSnapshotStatusArchiveTaskUID) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 UniversalID - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.UniversalID = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m RemoteRestoreSnapshotStatusArchiveTaskUID) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.UniversalID) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this remote restore snapshot status archive task Uid -func (m *RemoteRestoreSnapshotStatusArchiveTaskUID) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UniversalID - if err := m.UniversalID.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this remote restore snapshot status archive task Uid based on the context it is used -func (m *RemoteRestoreSnapshotStatusArchiveTaskUID) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UniversalID - if err := m.UniversalID.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *RemoteRestoreSnapshotStatusArchiveTaskUID) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RemoteRestoreSnapshotStatusArchiveTaskUID) UnmarshalBinary(b []byte) error { - var res RemoteRestoreSnapshotStatusArchiveTaskUID - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/remote_restore_snapshot_status_snapshot_task_uid.go b/v1/models/remote_restore_snapshot_status_snapshot_task_uid.go deleted file mode 100644 index 129aac85..00000000 --- a/v1/models/remote_restore_snapshot_status_snapshot_task_uid.go +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RemoteRestoreSnapshotStatusSnapshotTaskUID Snapshot Task Uid. -// -// Specifies the globally unique id of the task capturing the Snapshot. -// -// swagger:model remoteRestoreSnapshotStatusSnapshotTaskUid -type RemoteRestoreSnapshotStatusSnapshotTaskUID struct { - UniversalID -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *RemoteRestoreSnapshotStatusSnapshotTaskUID) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 UniversalID - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.UniversalID = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m RemoteRestoreSnapshotStatusSnapshotTaskUID) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.UniversalID) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this remote restore snapshot status snapshot task Uid -func (m *RemoteRestoreSnapshotStatusSnapshotTaskUID) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UniversalID - if err := m.UniversalID.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this remote restore snapshot status snapshot task Uid based on the context it is used -func (m *RemoteRestoreSnapshotStatusSnapshotTaskUID) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UniversalID - if err := m.UniversalID.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *RemoteRestoreSnapshotStatusSnapshotTaskUID) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RemoteRestoreSnapshotStatusSnapshotTaskUID) UnmarshalBinary(b []byte) error { - var res RemoteRestoreSnapshotStatusSnapshotTaskUID - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/remote_vault_restore_task_status.go b/v1/models/remote_vault_restore_task_status.go index 7b309a00..dd73c40b 100644 --- a/v1/models/remote_vault_restore_task_status.go +++ b/v1/models/remote_vault_restore_task_status.go @@ -20,17 +20,42 @@ import ( // swagger:model RemoteVaultRestoreTaskStatus type RemoteVaultRestoreTaskStatus struct { - // current indexing status - CurrentIndexingStatus *RemoteVaultRestoreTaskStatusCurrentIndexingStatus `json:"currentIndexingStatus,omitempty"` - - // current snapshot status - CurrentSnapshotStatus *RemoteVaultRestoreTaskStatusCurrentSnapshotStatus `json:"currentSnapshotStatus,omitempty"` - - // local protection job Uid - LocalProtectionJobUID *RemoteVaultRestoreTaskStatusLocalProtectionJobUID `json:"localProtectionJobUid,omitempty"` - - // parent job Uid - ParentJobUID *RemoteVaultRestoreTaskStatusParentJobUID `json:"parentJobUid,omitempty"` + // Status of Indexing Restore Task. + // + // Specifies the status of an indexing task that builds an index from + // the Protection Job metadata retrieved from the remote Vault. + // The index contains information about Job Runs (Snapshots) + // for a Protection Job and is required to restore Snapshots to this + // local Cluster. + CurrentIndexingStatus struct { + RemoteRestoreIndexingStatus + } `json:"currentIndexingStatus,omitempty"` + + // Status of Snapshot Restore Task. + // + // Specifies the status of the Snapshot restore task. + // The Snapshot restore task restores the specified archived Snapshots from + // a remote Vault to this Cluster. + CurrentSnapshotStatus struct { + RemoteRestoreSnapshotStatus + } `json:"currentSnapshotStatus,omitempty"` + + // Local Protection Job Uid. + // + // Specifies the globally unique id of the new inactive Protection Job + // created on the local Cluster as part of the restoration of archived + // data. + LocalProtectionJobUID struct { + UniversalID + } `json:"localProtectionJobUid,omitempty"` + + // Parent Job Uid. + // + // Specifies the unique id of the parent Job/task that spawned the + // indexing and Snapshot restore tasks. + ParentJobUID struct { + UniversalID + } `json:"parentJobUid,omitempty"` // Remote Protection Job Information. // @@ -38,8 +63,12 @@ type RemoteVaultRestoreTaskStatus struct { // to the remote Vault (External Target). RemoteProtectionJobInformation *RemoteProtectionJobInformation `json:"remoteProtectionJobInformation,omitempty"` - // search job Uid - SearchJobUID *RemoteVaultRestoreTaskStatusSearchJobUID `json:"searchJobUid,omitempty"` + // Search Job Uid. + // + // Specifies the unique id of the search Job that searched the remote Vault. + SearchJobUID struct { + UniversalID + } `json:"searchJobUid,omitempty"` // Vault Id // @@ -91,17 +120,6 @@ func (m *RemoteVaultRestoreTaskStatus) validateCurrentIndexingStatus(formats str return nil } - if m.CurrentIndexingStatus != nil { - if err := m.CurrentIndexingStatus.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("currentIndexingStatus") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("currentIndexingStatus") - } - return err - } - } - return nil } @@ -110,17 +128,6 @@ func (m *RemoteVaultRestoreTaskStatus) validateCurrentSnapshotStatus(formats str return nil } - if m.CurrentSnapshotStatus != nil { - if err := m.CurrentSnapshotStatus.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("currentSnapshotStatus") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("currentSnapshotStatus") - } - return err - } - } - return nil } @@ -129,17 +136,6 @@ func (m *RemoteVaultRestoreTaskStatus) validateLocalProtectionJobUID(formats str return nil } - if m.LocalProtectionJobUID != nil { - if err := m.LocalProtectionJobUID.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("localProtectionJobUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("localProtectionJobUid") - } - return err - } - } - return nil } @@ -148,17 +144,6 @@ func (m *RemoteVaultRestoreTaskStatus) validateParentJobUID(formats strfmt.Regis return nil } - if m.ParentJobUID != nil { - if err := m.ParentJobUID.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parentJobUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parentJobUid") - } - return err - } - } - return nil } @@ -186,17 +171,6 @@ func (m *RemoteVaultRestoreTaskStatus) validateSearchJobUID(formats strfmt.Regis return nil } - if m.SearchJobUID != nil { - if err := m.SearchJobUID.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("searchJobUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("searchJobUid") - } - return err - } - } - return nil } @@ -236,85 +210,21 @@ func (m *RemoteVaultRestoreTaskStatus) ContextValidate(ctx context.Context, form func (m *RemoteVaultRestoreTaskStatus) contextValidateCurrentIndexingStatus(ctx context.Context, formats strfmt.Registry) error { - if m.CurrentIndexingStatus != nil { - - if swag.IsZero(m.CurrentIndexingStatus) { // not required - return nil - } - - if err := m.CurrentIndexingStatus.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("currentIndexingStatus") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("currentIndexingStatus") - } - return err - } - } - return nil } func (m *RemoteVaultRestoreTaskStatus) contextValidateCurrentSnapshotStatus(ctx context.Context, formats strfmt.Registry) error { - if m.CurrentSnapshotStatus != nil { - - if swag.IsZero(m.CurrentSnapshotStatus) { // not required - return nil - } - - if err := m.CurrentSnapshotStatus.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("currentSnapshotStatus") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("currentSnapshotStatus") - } - return err - } - } - return nil } func (m *RemoteVaultRestoreTaskStatus) contextValidateLocalProtectionJobUID(ctx context.Context, formats strfmt.Registry) error { - if m.LocalProtectionJobUID != nil { - - if swag.IsZero(m.LocalProtectionJobUID) { // not required - return nil - } - - if err := m.LocalProtectionJobUID.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("localProtectionJobUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("localProtectionJobUid") - } - return err - } - } - return nil } func (m *RemoteVaultRestoreTaskStatus) contextValidateParentJobUID(ctx context.Context, formats strfmt.Registry) error { - if m.ParentJobUID != nil { - - if swag.IsZero(m.ParentJobUID) { // not required - return nil - } - - if err := m.ParentJobUID.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parentJobUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parentJobUid") - } - return err - } - } - return nil } @@ -341,22 +251,6 @@ func (m *RemoteVaultRestoreTaskStatus) contextValidateRemoteProtectionJobInforma func (m *RemoteVaultRestoreTaskStatus) contextValidateSearchJobUID(ctx context.Context, formats strfmt.Registry) error { - if m.SearchJobUID != nil { - - if swag.IsZero(m.SearchJobUID) { // not required - return nil - } - - if err := m.SearchJobUID.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("searchJobUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("searchJobUid") - } - return err - } - } - return nil } diff --git a/v1/models/remote_vault_restore_task_status_current_indexing_status.go b/v1/models/remote_vault_restore_task_status_current_indexing_status.go deleted file mode 100644 index 6469d8ce..00000000 --- a/v1/models/remote_vault_restore_task_status_current_indexing_status.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RemoteVaultRestoreTaskStatusCurrentIndexingStatus Status of Indexing Restore Task. -// -// Specifies the status of an indexing task that builds an index from -// the Protection Job metadata retrieved from the remote Vault. -// The index contains information about Job Runs (Snapshots) -// for a Protection Job and is required to restore Snapshots to this -// local Cluster. -// -// swagger:model remoteVaultRestoreTaskStatusCurrentIndexingStatus -type RemoteVaultRestoreTaskStatusCurrentIndexingStatus struct { - RemoteRestoreIndexingStatus -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *RemoteVaultRestoreTaskStatusCurrentIndexingStatus) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 RemoteRestoreIndexingStatus - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.RemoteRestoreIndexingStatus = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m RemoteVaultRestoreTaskStatusCurrentIndexingStatus) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.RemoteRestoreIndexingStatus) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this remote vault restore task status current indexing status -func (m *RemoteVaultRestoreTaskStatusCurrentIndexingStatus) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with RemoteRestoreIndexingStatus - if err := m.RemoteRestoreIndexingStatus.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this remote vault restore task status current indexing status based on the context it is used -func (m *RemoteVaultRestoreTaskStatusCurrentIndexingStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with RemoteRestoreIndexingStatus - if err := m.RemoteRestoreIndexingStatus.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *RemoteVaultRestoreTaskStatusCurrentIndexingStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RemoteVaultRestoreTaskStatusCurrentIndexingStatus) UnmarshalBinary(b []byte) error { - var res RemoteVaultRestoreTaskStatusCurrentIndexingStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/remote_vault_restore_task_status_current_snapshot_status.go b/v1/models/remote_vault_restore_task_status_current_snapshot_status.go deleted file mode 100644 index c389988d..00000000 --- a/v1/models/remote_vault_restore_task_status_current_snapshot_status.go +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RemoteVaultRestoreTaskStatusCurrentSnapshotStatus Status of Snapshot Restore Task. -// -// Specifies the status of the Snapshot restore task. -// The Snapshot restore task restores the specified archived Snapshots from -// a remote Vault to this Cluster. -// -// swagger:model remoteVaultRestoreTaskStatusCurrentSnapshotStatus -type RemoteVaultRestoreTaskStatusCurrentSnapshotStatus struct { - RemoteRestoreSnapshotStatus -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *RemoteVaultRestoreTaskStatusCurrentSnapshotStatus) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 RemoteRestoreSnapshotStatus - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.RemoteRestoreSnapshotStatus = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m RemoteVaultRestoreTaskStatusCurrentSnapshotStatus) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.RemoteRestoreSnapshotStatus) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this remote vault restore task status current snapshot status -func (m *RemoteVaultRestoreTaskStatusCurrentSnapshotStatus) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with RemoteRestoreSnapshotStatus - if err := m.RemoteRestoreSnapshotStatus.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this remote vault restore task status current snapshot status based on the context it is used -func (m *RemoteVaultRestoreTaskStatusCurrentSnapshotStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with RemoteRestoreSnapshotStatus - if err := m.RemoteRestoreSnapshotStatus.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *RemoteVaultRestoreTaskStatusCurrentSnapshotStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RemoteVaultRestoreTaskStatusCurrentSnapshotStatus) UnmarshalBinary(b []byte) error { - var res RemoteVaultRestoreTaskStatusCurrentSnapshotStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/remote_vault_restore_task_status_local_protection_job_uid.go b/v1/models/remote_vault_restore_task_status_local_protection_job_uid.go deleted file mode 100644 index 9b1c50c5..00000000 --- a/v1/models/remote_vault_restore_task_status_local_protection_job_uid.go +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RemoteVaultRestoreTaskStatusLocalProtectionJobUID Local Protection Job Uid. -// -// Specifies the globally unique id of the new inactive Protection Job -// created on the local Cluster as part of the restoration of archived -// data. -// -// swagger:model remoteVaultRestoreTaskStatusLocalProtectionJobUid -type RemoteVaultRestoreTaskStatusLocalProtectionJobUID struct { - UniversalID -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *RemoteVaultRestoreTaskStatusLocalProtectionJobUID) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 UniversalID - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.UniversalID = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m RemoteVaultRestoreTaskStatusLocalProtectionJobUID) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.UniversalID) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this remote vault restore task status local protection job Uid -func (m *RemoteVaultRestoreTaskStatusLocalProtectionJobUID) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UniversalID - if err := m.UniversalID.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this remote vault restore task status local protection job Uid based on the context it is used -func (m *RemoteVaultRestoreTaskStatusLocalProtectionJobUID) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UniversalID - if err := m.UniversalID.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *RemoteVaultRestoreTaskStatusLocalProtectionJobUID) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RemoteVaultRestoreTaskStatusLocalProtectionJobUID) UnmarshalBinary(b []byte) error { - var res RemoteVaultRestoreTaskStatusLocalProtectionJobUID - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/remote_vault_restore_task_status_parent_job_uid.go b/v1/models/remote_vault_restore_task_status_parent_job_uid.go deleted file mode 100644 index e9ee76d7..00000000 --- a/v1/models/remote_vault_restore_task_status_parent_job_uid.go +++ /dev/null @@ -1,96 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RemoteVaultRestoreTaskStatusParentJobUID Parent Job Uid. -// -// Specifies the unique id of the parent Job/task that spawned the -// indexing and Snapshot restore tasks. -// -// swagger:model remoteVaultRestoreTaskStatusParentJobUid -type RemoteVaultRestoreTaskStatusParentJobUID struct { - UniversalID -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *RemoteVaultRestoreTaskStatusParentJobUID) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 UniversalID - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.UniversalID = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m RemoteVaultRestoreTaskStatusParentJobUID) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.UniversalID) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this remote vault restore task status parent job Uid -func (m *RemoteVaultRestoreTaskStatusParentJobUID) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UniversalID - if err := m.UniversalID.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this remote vault restore task status parent job Uid based on the context it is used -func (m *RemoteVaultRestoreTaskStatusParentJobUID) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UniversalID - if err := m.UniversalID.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *RemoteVaultRestoreTaskStatusParentJobUID) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RemoteVaultRestoreTaskStatusParentJobUID) UnmarshalBinary(b []byte) error { - var res RemoteVaultRestoreTaskStatusParentJobUID - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/remote_vault_restore_task_status_search_job_uid.go b/v1/models/remote_vault_restore_task_status_search_job_uid.go deleted file mode 100644 index 251652c6..00000000 --- a/v1/models/remote_vault_restore_task_status_search_job_uid.go +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RemoteVaultRestoreTaskStatusSearchJobUID Search Job Uid. -// -// Specifies the unique id of the search Job that searched the remote Vault. -// -// swagger:model remoteVaultRestoreTaskStatusSearchJobUid -type RemoteVaultRestoreTaskStatusSearchJobUID struct { - UniversalID -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *RemoteVaultRestoreTaskStatusSearchJobUID) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 UniversalID - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.UniversalID = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m RemoteVaultRestoreTaskStatusSearchJobUID) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.UniversalID) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this remote vault restore task status search job Uid -func (m *RemoteVaultRestoreTaskStatusSearchJobUID) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UniversalID - if err := m.UniversalID.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this remote vault restore task status search job Uid based on the context it is used -func (m *RemoteVaultRestoreTaskStatusSearchJobUID) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UniversalID - if err := m.UniversalID.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *RemoteVaultRestoreTaskStatusSearchJobUID) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RemoteVaultRestoreTaskStatusSearchJobUID) UnmarshalBinary(b []byte) error { - var res RemoteVaultRestoreTaskStatusSearchJobUID - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/remote_vault_search_job_information.go b/v1/models/remote_vault_search_job_information.go index c5a8958d..8afa7e7a 100644 --- a/v1/models/remote_vault_search_job_information.go +++ b/v1/models/remote_vault_search_job_information.go @@ -59,8 +59,12 @@ type RemoteVaultSearchJobInformation struct { // Enum: ["kJobRunning","kJobFinished","kJobFailed","kJobCanceled","kJobPaused"] SearchJobStatus *string `json:"searchJobStatus,omitempty"` - // search job Uid - SearchJobUID *RemoteVaultSearchJobInformationSearchJobUID `json:"searchJobUid,omitempty"` + // Search Job Uid. + // + // Specifies the unique id assigned to the search Job by the Cluster. + SearchJobUID struct { + UniversalID + } `json:"searchJobUid,omitempty"` // Specifies the start time of the search as a Unix epoch // Timestamp (in microseconds). @@ -147,17 +151,6 @@ func (m *RemoteVaultSearchJobInformation) validateSearchJobUID(formats strfmt.Re return nil } - if m.SearchJobUID != nil { - if err := m.SearchJobUID.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("searchJobUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("searchJobUid") - } - return err - } - } - return nil } @@ -177,22 +170,6 @@ func (m *RemoteVaultSearchJobInformation) ContextValidate(ctx context.Context, f func (m *RemoteVaultSearchJobInformation) contextValidateSearchJobUID(ctx context.Context, formats strfmt.Registry) error { - if m.SearchJobUID != nil { - - if swag.IsZero(m.SearchJobUID) { // not required - return nil - } - - if err := m.SearchJobUID.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("searchJobUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("searchJobUid") - } - return err - } - } - return nil } diff --git a/v1/models/remote_vault_search_job_information_search_job_uid.go b/v1/models/remote_vault_search_job_information_search_job_uid.go deleted file mode 100644 index d74e7301..00000000 --- a/v1/models/remote_vault_search_job_information_search_job_uid.go +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RemoteVaultSearchJobInformationSearchJobUID Search Job Uid. -// -// Specifies the unique id assigned to the search Job by the Cluster. -// -// swagger:model remoteVaultSearchJobInformationSearchJobUid -type RemoteVaultSearchJobInformationSearchJobUID struct { - UniversalID -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *RemoteVaultSearchJobInformationSearchJobUID) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 UniversalID - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.UniversalID = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m RemoteVaultSearchJobInformationSearchJobUID) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.UniversalID) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this remote vault search job information search job Uid -func (m *RemoteVaultSearchJobInformationSearchJobUID) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UniversalID - if err := m.UniversalID.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this remote vault search job information search job Uid based on the context it is used -func (m *RemoteVaultSearchJobInformationSearchJobUID) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UniversalID - if err := m.UniversalID.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *RemoteVaultSearchJobInformationSearchJobUID) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RemoteVaultSearchJobInformationSearchJobUID) UnmarshalBinary(b []byte) error { - var res RemoteVaultSearchJobInformationSearchJobUID - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/remote_vault_search_job_results.go b/v1/models/remote_vault_search_job_results.go index c19b9bd1..b493e0c2 100644 --- a/v1/models/remote_vault_search_job_results.go +++ b/v1/models/remote_vault_search_job_results.go @@ -77,8 +77,12 @@ type RemoteVaultSearchJobResults struct { // Enum: ["kJobRunning","kJobFinished","kJobFailed","kJobCanceled","kJobPaused"] SearchJobStatus *string `json:"searchJobStatus,omitempty"` - // search job Uid - SearchJobUID *RemoteVaultSearchJobResultsSearchJobUID `json:"searchJobUid,omitempty"` + // Search Job Id. + // + // Specifies the unique id of the search Job assigned by the Cluster. + SearchJobUID struct { + UniversalID + } `json:"searchJobUid,omitempty"` // Specifies the value of startTimeUsecs if it was set in the original // search Job. Start time is recorded as a Unix epoch Timestamp @@ -196,17 +200,6 @@ func (m *RemoteVaultSearchJobResults) validateSearchJobUID(formats strfmt.Regist return nil } - if m.SearchJobUID != nil { - if err := m.SearchJobUID.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("searchJobUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("searchJobUid") - } - return err - } - } - return nil } @@ -255,22 +248,6 @@ func (m *RemoteVaultSearchJobResults) contextValidateProtectionJobs(ctx context. func (m *RemoteVaultSearchJobResults) contextValidateSearchJobUID(ctx context.Context, formats strfmt.Registry) error { - if m.SearchJobUID != nil { - - if swag.IsZero(m.SearchJobUID) { // not required - return nil - } - - if err := m.SearchJobUID.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("searchJobUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("searchJobUid") - } - return err - } - } - return nil } diff --git a/v1/models/remote_vault_search_job_results_search_job_uid.go b/v1/models/remote_vault_search_job_results_search_job_uid.go deleted file mode 100644 index 1acb8418..00000000 --- a/v1/models/remote_vault_search_job_results_search_job_uid.go +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RemoteVaultSearchJobResultsSearchJobUID Search Job Id. -// -// Specifies the unique id of the search Job assigned by the Cluster. -// -// swagger:model remoteVaultSearchJobResultsSearchJobUid -type RemoteVaultSearchJobResultsSearchJobUID struct { - UniversalID -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *RemoteVaultSearchJobResultsSearchJobUID) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 UniversalID - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.UniversalID = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m RemoteVaultSearchJobResultsSearchJobUID) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.UniversalID) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this remote vault search job results search job Uid -func (m *RemoteVaultSearchJobResultsSearchJobUID) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UniversalID - if err := m.UniversalID.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this remote vault search job results search job Uid based on the context it is used -func (m *RemoteVaultSearchJobResultsSearchJobUID) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UniversalID - if err := m.UniversalID.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *RemoteVaultSearchJobResultsSearchJobUID) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RemoteVaultSearchJobResultsSearchJobUID) UnmarshalBinary(b []byte) error { - var res RemoteVaultSearchJobResultsSearchJobUID - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/replication_info_base.go b/v1/models/replication_info_base.go index 8a9e0024..61bad2d5 100644 --- a/v1/models/replication_info_base.go +++ b/v1/models/replication_info_base.go @@ -96,6 +96,9 @@ type ReplicationInfoBase struct { // The name of the view that is being replicated. ViewName *string `json:"viewName,omitempty"` + + // Field to maintain the VMware adapter specific Rx cluster capabilities. + VmwareRxClusterCapability *VMwareRxClusterCapability `json:"vmwareRxClusterCapability,omitempty"` } // Validate validates this replication info base @@ -118,6 +121,10 @@ func (m *ReplicationInfoBase) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateVmwareRxClusterCapability(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -207,6 +214,25 @@ func (m *ReplicationInfoBase) validateFilteredBackupTaskIDMap(formats strfmt.Reg return nil } +func (m *ReplicationInfoBase) validateVmwareRxClusterCapability(formats strfmt.Registry) error { + if swag.IsZero(m.VmwareRxClusterCapability) { // not required + return nil + } + + if m.VmwareRxClusterCapability != nil { + if err := m.VmwareRxClusterCapability.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("vmwareRxClusterCapability") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("vmwareRxClusterCapability") + } + return err + } + } + + return nil +} + // ContextValidate validate this replication info base based on the context it is used func (m *ReplicationInfoBase) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error @@ -227,6 +253,10 @@ func (m *ReplicationInfoBase) ContextValidate(ctx context.Context, formats strfm res = append(res, err) } + if err := m.contextValidateVmwareRxClusterCapability(ctx, formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -321,6 +351,27 @@ func (m *ReplicationInfoBase) contextValidateFilteredBackupTaskIDMap(ctx context return nil } +func (m *ReplicationInfoBase) contextValidateVmwareRxClusterCapability(ctx context.Context, formats strfmt.Registry) error { + + if m.VmwareRxClusterCapability != nil { + + if swag.IsZero(m.VmwareRxClusterCapability) { // not required + return nil + } + + if err := m.VmwareRxClusterCapability.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("vmwareRxClusterCapability") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("vmwareRxClusterCapability") + } + return err + } + } + + return nil +} + // MarshalBinary interface implementation func (m *ReplicationInfoBase) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/v1/models/restore_files_task_request.go b/v1/models/restore_files_task_request.go index 369898aa..b910be21 100644 --- a/v1/models/restore_files_task_request.go +++ b/v1/models/restore_files_task_request.go @@ -81,8 +81,19 @@ type RestoreFilesTaskRequest struct { // Specifies information regarding files and directories. RestoredFileInfoList []*RestoredFileInfoList `json:"restoredFileInfoList"` - // source object info - SourceObjectInfo *RestoreFilesTaskRequestSourceObjectInfo `json:"sourceObjectInfo,omitempty"` + // Restore Object. + // + // Specifies information about the source object (such as a VM) + // that contains the files and folders to recover. + // In addition, it contains information about the Protection Job and Job + // Run that captured the snapshot to recover from. + // To specify a particular snapshot, you must specify a + // jobRunId and a startTimeUsecs. + // If jobRunId and startTimeUsecs are not specified, + // the last Job Run of the specified Job is used. + SourceObjectInfo struct { + RestoreObjectDetails + } `json:"sourceObjectInfo,omitempty"` // Specifies the target host types to be restored. // 'kLinux' indicates the Linux operating system. @@ -250,17 +261,6 @@ func (m *RestoreFilesTaskRequest) validateSourceObjectInfo(formats strfmt.Regist return nil } - if m.SourceObjectInfo != nil { - if err := m.SourceObjectInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sourceObjectInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sourceObjectInfo") - } - return err - } - } - return nil } @@ -424,22 +424,6 @@ func (m *RestoreFilesTaskRequest) contextValidateRestoredFileInfoList(ctx contex func (m *RestoreFilesTaskRequest) contextValidateSourceObjectInfo(ctx context.Context, formats strfmt.Registry) error { - if m.SourceObjectInfo != nil { - - if swag.IsZero(m.SourceObjectInfo) { // not required - return nil - } - - if err := m.SourceObjectInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sourceObjectInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sourceObjectInfo") - } - return err - } - } - return nil } diff --git a/v1/models/restore_files_task_request_source_object_info.go b/v1/models/restore_files_task_request_source_object_info.go deleted file mode 100644 index 1bb83726..00000000 --- a/v1/models/restore_files_task_request_source_object_info.go +++ /dev/null @@ -1,102 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RestoreFilesTaskRequestSourceObjectInfo Restore Object. -// -// Specifies information about the source object (such as a VM) -// that contains the files and folders to recover. -// In addition, it contains information about the Protection Job and Job -// Run that captured the snapshot to recover from. -// To specify a particular snapshot, you must specify a -// jobRunId and a startTimeUsecs. -// If jobRunId and startTimeUsecs are not specified, -// the last Job Run of the specified Job is used. -// -// swagger:model restoreFilesTaskRequestSourceObjectInfo -type RestoreFilesTaskRequestSourceObjectInfo struct { - RestoreObjectDetails -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *RestoreFilesTaskRequestSourceObjectInfo) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 RestoreObjectDetails - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.RestoreObjectDetails = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m RestoreFilesTaskRequestSourceObjectInfo) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.RestoreObjectDetails) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this restore files task request source object info -func (m *RestoreFilesTaskRequestSourceObjectInfo) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with RestoreObjectDetails - if err := m.RestoreObjectDetails.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this restore files task request source object info based on the context it is used -func (m *RestoreFilesTaskRequestSourceObjectInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with RestoreObjectDetails - if err := m.RestoreObjectDetails.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreFilesTaskRequestSourceObjectInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreFilesTaskRequestSourceObjectInfo) UnmarshalBinary(b []byte) error { - var res RestoreFilesTaskRequestSourceObjectInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_object_customization.go b/v1/models/restore_object_customization.go new file mode 100644 index 00000000..ac681b2a --- /dev/null +++ b/v1/models/restore_object_customization.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// RestoreObjectCustomization Proto to specify the restore object customization. +// +// swagger:model RestoreObjectCustomization +type RestoreObjectCustomization struct { + + // Represents the Entity id of the object for which below customizations are + // populated. + EntityID *int64 `json:"entityId,omitempty"` + + // Indicates the Network configuration for the restore object. + NetworkConfig *RestoredObjectNetworkConfigProto `json:"networkConfig,omitempty"` +} + +// Validate validates this restore object customization +func (m *RestoreObjectCustomization) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateNetworkConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *RestoreObjectCustomization) validateNetworkConfig(formats strfmt.Registry) error { + if swag.IsZero(m.NetworkConfig) { // not required + return nil + } + + if m.NetworkConfig != nil { + if err := m.NetworkConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("networkConfig") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("networkConfig") + } + return err + } + } + + return nil +} + +// ContextValidate validate this restore object customization based on the context it is used +func (m *RestoreObjectCustomization) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateNetworkConfig(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *RestoreObjectCustomization) contextValidateNetworkConfig(ctx context.Context, formats strfmt.Registry) error { + + if m.NetworkConfig != nil { + + if swag.IsZero(m.NetworkConfig) { // not required + return nil + } + + if err := m.NetworkConfig.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("networkConfig") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("networkConfig") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *RestoreObjectCustomization) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *RestoreObjectCustomization) UnmarshalBinary(b []byte) error { + var res RestoreObjectCustomization + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/v1/models/restore_object_details.go b/v1/models/restore_object_details.go index 35b21162..5ce66bb6 100644 --- a/v1/models/restore_object_details.go +++ b/v1/models/restore_object_details.go @@ -28,11 +28,24 @@ import ( // swagger:model RestoreObjectDetails type RestoreObjectDetails struct { - // archival target - ArchivalTarget *RestoreObjectDetailsArchivalTarget `json:"archivalTarget,omitempty"` - - // cloud deploy target - CloudDeployTarget *RestoreObjectDetailsCloudDeployTarget `json:"cloudDeployTarget,omitempty"` + // Archival Target. + // + // Specifies settings about the Archival Target (such as Tape or AWS). + // This field must be set if the object + // is being recovered or cloned from an archive or if files + // or folders are being restored from an archive. + ArchivalTarget struct { + ArchivalExternalTarget + } `json:"archivalTarget,omitempty"` + + // CloudDeploy Target. + // + // Specifies settings about the Cloud Deploy target. + // This field must be set if the restore type is kDeployVMs and the object is + // to be deployed to cloud using a previously converted image. + CloudDeployTarget struct { + CloudDeployTargetDetails + } `json:"cloudDeployTarget,omitempty"` // Specifies the type of the Protection Source. // Supported environment types such as 'kView', 'kSQL', 'kVMware', etc. @@ -98,8 +111,14 @@ type RestoreObjectDetails struct { // Specifies the id of the Job Run that captured the snapshot. JobRunID *int64 `json:"jobRunId,omitempty"` - // job Uid - JobUID *RestoreObjectDetailsJobUID `json:"jobUid,omitempty"` + // Universal Id. + // + // Specifies the universal id of the Protection Job that backed up + // the objects to recover or clone or the objects that contain the + // files or folders to recover. + JobUID struct { + UniversalID + } `json:"jobUid,omitempty"` // Specifies the timestamp (in microseconds. from epoch) for recovering // to a point-in-time in the past. @@ -148,17 +167,6 @@ func (m *RestoreObjectDetails) validateArchivalTarget(formats strfmt.Registry) e return nil } - if m.ArchivalTarget != nil { - if err := m.ArchivalTarget.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("archivalTarget") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("archivalTarget") - } - return err - } - } - return nil } @@ -167,17 +175,6 @@ func (m *RestoreObjectDetails) validateCloudDeployTarget(formats strfmt.Registry return nil } - if m.CloudDeployTarget != nil { - if err := m.CloudDeployTarget.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudDeployTarget") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudDeployTarget") - } - return err - } - } - return nil } @@ -363,17 +360,6 @@ func (m *RestoreObjectDetails) validateJobUID(formats strfmt.Registry) error { return nil } - if m.JobUID != nil { - if err := m.JobUID.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("jobUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("jobUid") - } - return err - } - } - return nil } @@ -401,64 +387,16 @@ func (m *RestoreObjectDetails) ContextValidate(ctx context.Context, formats strf func (m *RestoreObjectDetails) contextValidateArchivalTarget(ctx context.Context, formats strfmt.Registry) error { - if m.ArchivalTarget != nil { - - if swag.IsZero(m.ArchivalTarget) { // not required - return nil - } - - if err := m.ArchivalTarget.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("archivalTarget") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("archivalTarget") - } - return err - } - } - return nil } func (m *RestoreObjectDetails) contextValidateCloudDeployTarget(ctx context.Context, formats strfmt.Registry) error { - if m.CloudDeployTarget != nil { - - if swag.IsZero(m.CloudDeployTarget) { // not required - return nil - } - - if err := m.CloudDeployTarget.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloudDeployTarget") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloudDeployTarget") - } - return err - } - } - return nil } func (m *RestoreObjectDetails) contextValidateJobUID(ctx context.Context, formats strfmt.Registry) error { - if m.JobUID != nil { - - if swag.IsZero(m.JobUID) { // not required - return nil - } - - if err := m.JobUID.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("jobUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("jobUid") - } - return err - } - } - return nil } diff --git a/v1/models/restore_object_details_archival_target.go b/v1/models/restore_object_details_archival_target.go deleted file mode 100644 index 6166ecb1..00000000 --- a/v1/models/restore_object_details_archival_target.go +++ /dev/null @@ -1,98 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RestoreObjectDetailsArchivalTarget Archival Target. -// -// Specifies settings about the Archival Target (such as Tape or AWS). -// This field must be set if the object -// is being recovered or cloned from an archive or if files -// or folders are being restored from an archive. -// -// swagger:model restoreObjectDetailsArchivalTarget -type RestoreObjectDetailsArchivalTarget struct { - ArchivalExternalTarget -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *RestoreObjectDetailsArchivalTarget) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 ArchivalExternalTarget - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.ArchivalExternalTarget = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m RestoreObjectDetailsArchivalTarget) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.ArchivalExternalTarget) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this restore object details archival target -func (m *RestoreObjectDetailsArchivalTarget) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ArchivalExternalTarget - if err := m.ArchivalExternalTarget.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this restore object details archival target based on the context it is used -func (m *RestoreObjectDetailsArchivalTarget) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ArchivalExternalTarget - if err := m.ArchivalExternalTarget.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreObjectDetailsArchivalTarget) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreObjectDetailsArchivalTarget) UnmarshalBinary(b []byte) error { - var res RestoreObjectDetailsArchivalTarget - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_object_details_cloud_deploy_target.go b/v1/models/restore_object_details_cloud_deploy_target.go deleted file mode 100644 index 78150989..00000000 --- a/v1/models/restore_object_details_cloud_deploy_target.go +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RestoreObjectDetailsCloudDeployTarget CloudDeploy Target. -// -// Specifies settings about the Cloud Deploy target. -// This field must be set if the restore type is kDeployVMs and the object is -// to be deployed to cloud using a previously converted image. -// -// swagger:model restoreObjectDetailsCloudDeployTarget -type RestoreObjectDetailsCloudDeployTarget struct { - CloudDeployTargetDetails -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *RestoreObjectDetailsCloudDeployTarget) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CloudDeployTargetDetails - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CloudDeployTargetDetails = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m RestoreObjectDetailsCloudDeployTarget) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.CloudDeployTargetDetails) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this restore object details cloud deploy target -func (m *RestoreObjectDetailsCloudDeployTarget) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CloudDeployTargetDetails - if err := m.CloudDeployTargetDetails.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this restore object details cloud deploy target based on the context it is used -func (m *RestoreObjectDetailsCloudDeployTarget) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CloudDeployTargetDetails - if err := m.CloudDeployTargetDetails.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreObjectDetailsCloudDeployTarget) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreObjectDetailsCloudDeployTarget) UnmarshalBinary(b []byte) error { - var res RestoreObjectDetailsCloudDeployTarget - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_object_details_job_uid.go b/v1/models/restore_object_details_job_uid.go deleted file mode 100644 index cc0db4f3..00000000 --- a/v1/models/restore_object_details_job_uid.go +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RestoreObjectDetailsJobUID Universal Id. -// -// Specifies the universal id of the Protection Job that backed up -// the objects to recover or clone or the objects that contain the -// files or folders to recover. -// -// swagger:model restoreObjectDetailsJobUid -type RestoreObjectDetailsJobUID struct { - UniversalID -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *RestoreObjectDetailsJobUID) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 UniversalID - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.UniversalID = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m RestoreObjectDetailsJobUID) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.UniversalID) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this restore object details job Uid -func (m *RestoreObjectDetailsJobUID) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UniversalID - if err := m.UniversalID.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this restore object details job Uid based on the context it is used -func (m *RestoreObjectDetailsJobUID) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UniversalID - if err := m.UniversalID.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreObjectDetailsJobUID) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreObjectDetailsJobUID) UnmarshalBinary(b []byte) error { - var res RestoreObjectDetailsJobUID - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_sql_app_object_params.go b/v1/models/restore_sql_app_object_params.go index f9fdc2eb..ef48f8a7 100644 --- a/v1/models/restore_sql_app_object_params.go +++ b/v1/models/restore_sql_app_object_params.go @@ -71,6 +71,9 @@ type RestoreSQLAppObjectParams struct { // not make sense to rename all databases in the owner. NewDatabaseName *string `json:"newDatabaseName,omitempty"` + // If this is set to true, we will replay the entire last log without STOPAT. + ReplayEntireLastLog *bool `json:"replayEntireLastLog,omitempty"` + // The time to which the SQL database needs to be restored. This allows for // granular recovery of SQL databases. If this is not set, the SQL database // will be recovered to the full/incremental snapshot (specified in the diff --git a/v1/models/restore_task.go b/v1/models/restore_task.go index f33fb297..7002fbe3 100644 --- a/v1/models/restore_task.go +++ b/v1/models/restore_task.go @@ -29,8 +29,14 @@ type RestoreTask struct { // Specifies parameters for restore task of application server object. ApplicationParameters *ApplicationRestoreParameters `json:"applicationParameters,omitempty"` - // archive task Uid - ArchiveTaskUID *RestoreTaskArchiveTaskUID `json:"archiveTaskUid,omitempty"` + // Specifies the uid of the Restore Task that retrieves objects from + // an archive. This field is only populated when objects + // must be retrieved from an archive before being restored. + // This field is deprecated. + // deprecated:true + ArchiveTaskUID struct { + UniversalID + } `json:"archiveTaskUid,omitempty"` // Specifies the uids of the Restore Task that retrieves objects from // an archive. This field is only populated when objects @@ -43,8 +49,10 @@ type RestoreTask struct { // Enum: ["kRunning","kTearingDown","kTornDown","kTearDownFailed"] CloneStatus *string `json:"cloneStatus,omitempty"` - // clone view parameters - CloneViewParameters *RestoreTaskCloneViewParameters `json:"cloneViewParameters,omitempty"` + // Specifies the View settings used when cloning a View. + CloneViewParameters struct { + UpdateViewParam + } `json:"cloneViewParameters,omitempty"` // Specifies if the Restore Task should continue when some operations on some // objects fail. If true, the Cohesity Cluster ignores intermittent @@ -66,8 +74,13 @@ type RestoreTask struct { // Restore Task completes. EndTimeUsecs *int64 `json:"endTimeUsecs,omitempty"` - // error - Error *RestoreTaskError `json:"error,omitempty"` + // Restore Task Error. + // + // Specifies the error reported by the Restore Task (if any) after the + // Task has finished. + Error struct { + RequestError + } `json:"error,omitempty"` // Specifies the full name of a View. FullViewName *string `json:"fullViewName,omitempty"` @@ -334,17 +347,6 @@ func (m *RestoreTask) validateArchiveTaskUID(formats strfmt.Registry) error { return nil } - if m.ArchiveTaskUID != nil { - if err := m.ArchiveTaskUID.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("archiveTaskUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("archiveTaskUid") - } - return err - } - } - return nil } @@ -427,17 +429,6 @@ func (m *RestoreTask) validateCloneViewParameters(formats strfmt.Registry) error return nil } - if m.CloneViewParameters != nil { - if err := m.CloneViewParameters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloneViewParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloneViewParameters") - } - return err - } - } - return nil } @@ -465,17 +456,6 @@ func (m *RestoreTask) validateError(formats strfmt.Registry) error { return nil } - if m.Error != nil { - if err := m.Error.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("error") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("error") - } - return err - } - } - return nil } @@ -999,22 +979,6 @@ func (m *RestoreTask) contextValidateApplicationParameters(ctx context.Context, func (m *RestoreTask) contextValidateArchiveTaskUID(ctx context.Context, formats strfmt.Registry) error { - if m.ArchiveTaskUID != nil { - - if swag.IsZero(m.ArchiveTaskUID) { // not required - return nil - } - - if err := m.ArchiveTaskUID.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("archiveTaskUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("archiveTaskUid") - } - return err - } - } - return nil } @@ -1045,22 +1009,6 @@ func (m *RestoreTask) contextValidateArchiveTaskUids(ctx context.Context, format func (m *RestoreTask) contextValidateCloneViewParameters(ctx context.Context, formats strfmt.Registry) error { - if m.CloneViewParameters != nil { - - if swag.IsZero(m.CloneViewParameters) { // not required - return nil - } - - if err := m.CloneViewParameters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cloneViewParameters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cloneViewParameters") - } - return err - } - } - return nil } @@ -1087,22 +1035,6 @@ func (m *RestoreTask) contextValidateDeployVmsToCloud(ctx context.Context, forma func (m *RestoreTask) contextValidateError(ctx context.Context, formats strfmt.Registry) error { - if m.Error != nil { - - if swag.IsZero(m.Error) { // not required - return nil - } - - if err := m.Error.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("error") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("error") - } - return err - } - } - return nil } diff --git a/v1/models/restore_task_archive_task_uid.go b/v1/models/restore_task_archive_task_uid.go deleted file mode 100644 index 5852d28b..00000000 --- a/v1/models/restore_task_archive_task_uid.go +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RestoreTaskArchiveTaskUID Specifies the uid of the Restore Task that retrieves objects from -// an archive. This field is only populated when objects -// must be retrieved from an archive before being restored. -// This field is deprecated. -// deprecated:true -// -// swagger:model restoreTaskArchiveTaskUid -type RestoreTaskArchiveTaskUID struct { - UniversalID -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *RestoreTaskArchiveTaskUID) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 UniversalID - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.UniversalID = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m RestoreTaskArchiveTaskUID) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.UniversalID) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this restore task archive task Uid -func (m *RestoreTaskArchiveTaskUID) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UniversalID - if err := m.UniversalID.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this restore task archive task Uid based on the context it is used -func (m *RestoreTaskArchiveTaskUID) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UniversalID - if err := m.UniversalID.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreTaskArchiveTaskUID) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreTaskArchiveTaskUID) UnmarshalBinary(b []byte) error { - var res RestoreTaskArchiveTaskUID - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_task_clone_view_parameters.go b/v1/models/restore_task_clone_view_parameters.go deleted file mode 100644 index ee2f1523..00000000 --- a/v1/models/restore_task_clone_view_parameters.go +++ /dev/null @@ -1,93 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RestoreTaskCloneViewParameters Specifies the View settings used when cloning a View. -// -// swagger:model restoreTaskCloneViewParameters -type RestoreTaskCloneViewParameters struct { - UpdateViewParam -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *RestoreTaskCloneViewParameters) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 UpdateViewParam - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.UpdateViewParam = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m RestoreTaskCloneViewParameters) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.UpdateViewParam) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this restore task clone view parameters -func (m *RestoreTaskCloneViewParameters) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UpdateViewParam - if err := m.UpdateViewParam.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this restore task clone view parameters based on the context it is used -func (m *RestoreTaskCloneViewParameters) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UpdateViewParam - if err := m.UpdateViewParam.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreTaskCloneViewParameters) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreTaskCloneViewParameters) UnmarshalBinary(b []byte) error { - var res RestoreTaskCloneViewParameters - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/restore_task_error.go b/v1/models/restore_task_error.go deleted file mode 100644 index e4b471bb..00000000 --- a/v1/models/restore_task_error.go +++ /dev/null @@ -1,96 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RestoreTaskError Restore Task Error. -// -// Specifies the error reported by the Restore Task (if any) after the -// Task has finished. -// -// swagger:model restoreTaskError -type RestoreTaskError struct { - RequestError -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *RestoreTaskError) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 RequestError - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.RequestError = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m RestoreTaskError) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.RequestError) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this restore task error -func (m *RestoreTaskError) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with RequestError - if err := m.RequestError.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this restore task error based on the context it is used -func (m *RestoreTaskError) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with RequestError - if err := m.RequestError.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *RestoreTaskError) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RestoreTaskError) UnmarshalBinary(b []byte) error { - var res RestoreTaskError - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/s3_protection_params.go b/v1/models/s3_protection_params.go new file mode 100644 index 00000000..ba97e95c --- /dev/null +++ b/v1/models/s3_protection_params.go @@ -0,0 +1,56 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// S3ProtectionParams AWS S3 Protection Params. +// +// Specifies the inventory report params required for s3 backups. +// +// swagger:model S3ProtectionParams +type S3ProtectionParams struct { + + // ARN of the inventory report destination bucket for S3 backups. + // This is required for s3 backups. + S3InventoryReportBucket *string `json:"s3InventoryReportBucket,omitempty"` + + // Specifies the creation time of the entity. + S3InventoryReportBucketPrefix *string `json:"s3InventoryReportBucketPrefix,omitempty"` +} + +// Validate validates this s3 protection params +func (m *S3ProtectionParams) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this s3 protection params based on context it is used +func (m *S3ProtectionParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *S3ProtectionParams) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *S3ProtectionParams) UnmarshalBinary(b []byte) error { + var res S3ProtectionParams + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/v1/models/scheduling_policy.go b/v1/models/scheduling_policy.go index cadfc982..109b6e0f 100644 --- a/v1/models/scheduling_policy.go +++ b/v1/models/scheduling_policy.go @@ -22,14 +22,25 @@ import ( // swagger:model SchedulingPolicy type SchedulingPolicy struct { - // continuous schedule - ContinuousSchedule *SchedulingPolicyContinuousSchedule `json:"continuousSchedule,omitempty"` - - // daily schedule - DailySchedule *SchedulingPolicyDailySchedule `json:"dailySchedule,omitempty"` - - // monthly schedule - MonthlySchedule *SchedulingPolicyMonthlySchedule `json:"monthlySchedule,omitempty"` + // Specifies the time interval between two Job Runs of a continuous backup + // schedule and any QuietTime periods when new Job Runs + // should NOT be started. + // Set if periodicity is kContinuous. + ContinuousSchedule struct { + ContinuousSchedule + } `json:"continuousSchedule,omitempty"` + + // Specifies a daily or weekly backup schedule. + // Set if periodicity is kDaily. + DailySchedule struct { + DailySchedule + } `json:"dailySchedule,omitempty"` + + // Specifies a monthly backup schedule. + // Set if periodicity is kMonthly. + MonthlySchedule struct { + MonthlySchedule + } `json:"monthlySchedule,omitempty"` // Specifies how often to start new Job Runs of a Protection Job. // 'kDaily' means new Job Runs start daily. @@ -41,8 +52,11 @@ type SchedulingPolicy struct { // Enum: ["kContinuous","kDaily","kMonthly","kContinuousRPO","kCDP"] Periodicity *string `json:"periodicity,omitempty"` - // rpo schedule - RpoSchedule *SchedulingPolicyRpoSchedule `json:"rpoSchedule,omitempty"` + // Specifies an RPO backup schedule. + // Set if periodicity is kContinuousRPO. + RpoSchedule struct { + RpoSchedule + } `json:"rpoSchedule,omitempty"` } // Validate validates this scheduling policy @@ -80,17 +94,6 @@ func (m *SchedulingPolicy) validateContinuousSchedule(formats strfmt.Registry) e return nil } - if m.ContinuousSchedule != nil { - if err := m.ContinuousSchedule.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("continuousSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("continuousSchedule") - } - return err - } - } - return nil } @@ -99,17 +102,6 @@ func (m *SchedulingPolicy) validateDailySchedule(formats strfmt.Registry) error return nil } - if m.DailySchedule != nil { - if err := m.DailySchedule.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dailySchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dailySchedule") - } - return err - } - } - return nil } @@ -118,17 +110,6 @@ func (m *SchedulingPolicy) validateMonthlySchedule(formats strfmt.Registry) erro return nil } - if m.MonthlySchedule != nil { - if err := m.MonthlySchedule.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("monthlySchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("monthlySchedule") - } - return err - } - } - return nil } @@ -188,17 +169,6 @@ func (m *SchedulingPolicy) validateRpoSchedule(formats strfmt.Registry) error { return nil } - if m.RpoSchedule != nil { - if err := m.RpoSchedule.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rpoSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rpoSchedule") - } - return err - } - } - return nil } @@ -230,85 +200,21 @@ func (m *SchedulingPolicy) ContextValidate(ctx context.Context, formats strfmt.R func (m *SchedulingPolicy) contextValidateContinuousSchedule(ctx context.Context, formats strfmt.Registry) error { - if m.ContinuousSchedule != nil { - - if swag.IsZero(m.ContinuousSchedule) { // not required - return nil - } - - if err := m.ContinuousSchedule.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("continuousSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("continuousSchedule") - } - return err - } - } - return nil } func (m *SchedulingPolicy) contextValidateDailySchedule(ctx context.Context, formats strfmt.Registry) error { - if m.DailySchedule != nil { - - if swag.IsZero(m.DailySchedule) { // not required - return nil - } - - if err := m.DailySchedule.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dailySchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dailySchedule") - } - return err - } - } - return nil } func (m *SchedulingPolicy) contextValidateMonthlySchedule(ctx context.Context, formats strfmt.Registry) error { - if m.MonthlySchedule != nil { - - if swag.IsZero(m.MonthlySchedule) { // not required - return nil - } - - if err := m.MonthlySchedule.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("monthlySchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("monthlySchedule") - } - return err - } - } - return nil } func (m *SchedulingPolicy) contextValidateRpoSchedule(ctx context.Context, formats strfmt.Registry) error { - if m.RpoSchedule != nil { - - if swag.IsZero(m.RpoSchedule) { // not required - return nil - } - - if err := m.RpoSchedule.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rpoSchedule") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rpoSchedule") - } - return err - } - } - return nil } diff --git a/v1/models/scheduling_policy_continuous_schedule.go b/v1/models/scheduling_policy_continuous_schedule.go deleted file mode 100644 index c2a8ec22..00000000 --- a/v1/models/scheduling_policy_continuous_schedule.go +++ /dev/null @@ -1,96 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// SchedulingPolicyContinuousSchedule Specifies the time interval between two Job Runs of a continuous backup -// schedule and any QuietTime periods when new Job Runs -// should NOT be started. -// Set if periodicity is kContinuous. -// -// swagger:model schedulingPolicyContinuousSchedule -type SchedulingPolicyContinuousSchedule struct { - ContinuousSchedule -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *SchedulingPolicyContinuousSchedule) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 ContinuousSchedule - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.ContinuousSchedule = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m SchedulingPolicyContinuousSchedule) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.ContinuousSchedule) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this scheduling policy continuous schedule -func (m *SchedulingPolicyContinuousSchedule) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ContinuousSchedule - if err := m.ContinuousSchedule.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this scheduling policy continuous schedule based on the context it is used -func (m *SchedulingPolicyContinuousSchedule) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ContinuousSchedule - if err := m.ContinuousSchedule.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *SchedulingPolicyContinuousSchedule) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SchedulingPolicyContinuousSchedule) UnmarshalBinary(b []byte) error { - var res SchedulingPolicyContinuousSchedule - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/scheduling_policy_daily_schedule.go b/v1/models/scheduling_policy_daily_schedule.go deleted file mode 100644 index 105cb01b..00000000 --- a/v1/models/scheduling_policy_daily_schedule.go +++ /dev/null @@ -1,94 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// SchedulingPolicyDailySchedule Specifies a daily or weekly backup schedule. -// Set if periodicity is kDaily. -// -// swagger:model schedulingPolicyDailySchedule -type SchedulingPolicyDailySchedule struct { - DailySchedule -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *SchedulingPolicyDailySchedule) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 DailySchedule - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.DailySchedule = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m SchedulingPolicyDailySchedule) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.DailySchedule) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this scheduling policy daily schedule -func (m *SchedulingPolicyDailySchedule) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with DailySchedule - if err := m.DailySchedule.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this scheduling policy daily schedule based on the context it is used -func (m *SchedulingPolicyDailySchedule) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with DailySchedule - if err := m.DailySchedule.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *SchedulingPolicyDailySchedule) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SchedulingPolicyDailySchedule) UnmarshalBinary(b []byte) error { - var res SchedulingPolicyDailySchedule - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/scheduling_policy_monthly_schedule.go b/v1/models/scheduling_policy_monthly_schedule.go deleted file mode 100644 index 8c0527b8..00000000 --- a/v1/models/scheduling_policy_monthly_schedule.go +++ /dev/null @@ -1,94 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// SchedulingPolicyMonthlySchedule Specifies a monthly backup schedule. -// Set if periodicity is kMonthly. -// -// swagger:model schedulingPolicyMonthlySchedule -type SchedulingPolicyMonthlySchedule struct { - MonthlySchedule -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *SchedulingPolicyMonthlySchedule) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 MonthlySchedule - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.MonthlySchedule = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m SchedulingPolicyMonthlySchedule) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.MonthlySchedule) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this scheduling policy monthly schedule -func (m *SchedulingPolicyMonthlySchedule) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with MonthlySchedule - if err := m.MonthlySchedule.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this scheduling policy monthly schedule based on the context it is used -func (m *SchedulingPolicyMonthlySchedule) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with MonthlySchedule - if err := m.MonthlySchedule.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *SchedulingPolicyMonthlySchedule) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SchedulingPolicyMonthlySchedule) UnmarshalBinary(b []byte) error { - var res SchedulingPolicyMonthlySchedule - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/scheduling_policy_rpo_schedule.go b/v1/models/scheduling_policy_rpo_schedule.go deleted file mode 100644 index 541892db..00000000 --- a/v1/models/scheduling_policy_rpo_schedule.go +++ /dev/null @@ -1,94 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// SchedulingPolicyRpoSchedule Specifies an RPO backup schedule. -// Set if periodicity is kContinuousRPO. -// -// swagger:model schedulingPolicyRpoSchedule -type SchedulingPolicyRpoSchedule struct { - RpoSchedule -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *SchedulingPolicyRpoSchedule) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 RpoSchedule - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.RpoSchedule = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m SchedulingPolicyRpoSchedule) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.RpoSchedule) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this scheduling policy rpo schedule -func (m *SchedulingPolicyRpoSchedule) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with RpoSchedule - if err := m.RpoSchedule.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this scheduling policy rpo schedule based on the context it is used -func (m *SchedulingPolicyRpoSchedule) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with RpoSchedule - if err := m.RpoSchedule.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *SchedulingPolicyRpoSchedule) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SchedulingPolicyRpoSchedule) UnmarshalBinary(b []byte) error { - var res SchedulingPolicyRpoSchedule - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/snapshot_archival_copy_policy.go b/v1/models/snapshot_archival_copy_policy.go index 2dc1d548..ecb0dc07 100644 --- a/v1/models/snapshot_archival_copy_policy.go +++ b/v1/models/snapshot_archival_copy_policy.go @@ -101,8 +101,10 @@ type SnapshotArchivalCopyPolicy struct { // Specifies a the source cluster id from which the data must be archived. SourceClusterID *int64 `json:"sourceClusterId,omitempty"` - // target - Target *SnapshotArchivalCopyPolicyTarget `json:"target,omitempty"` + // Specifies the archival target to copy the Snapshots to. + Target struct { + ArchivalExternalTarget + } `json:"target,omitempty"` } // Validate validates this snapshot archival copy policy @@ -287,17 +289,6 @@ func (m *SnapshotArchivalCopyPolicy) validateTarget(formats strfmt.Registry) err return nil } - if m.Target != nil { - if err := m.Target.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("target") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("target") - } - return err - } - } - return nil } @@ -371,22 +362,6 @@ func (m *SnapshotArchivalCopyPolicy) contextValidateRunTimeouts(ctx context.Cont func (m *SnapshotArchivalCopyPolicy) contextValidateTarget(ctx context.Context, formats strfmt.Registry) error { - if m.Target != nil { - - if swag.IsZero(m.Target) { // not required - return nil - } - - if err := m.Target.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("target") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("target") - } - return err - } - } - return nil } diff --git a/v1/models/snapshot_archival_copy_policy_target.go b/v1/models/snapshot_archival_copy_policy_target.go deleted file mode 100644 index fd03380e..00000000 --- a/v1/models/snapshot_archival_copy_policy_target.go +++ /dev/null @@ -1,93 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// SnapshotArchivalCopyPolicyTarget Specifies the archival target to copy the Snapshots to. -// -// swagger:model snapshotArchivalCopyPolicyTarget -type SnapshotArchivalCopyPolicyTarget struct { - ArchivalExternalTarget -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *SnapshotArchivalCopyPolicyTarget) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 ArchivalExternalTarget - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.ArchivalExternalTarget = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m SnapshotArchivalCopyPolicyTarget) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.ArchivalExternalTarget) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this snapshot archival copy policy target -func (m *SnapshotArchivalCopyPolicyTarget) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ArchivalExternalTarget - if err := m.ArchivalExternalTarget.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this snapshot archival copy policy target based on the context it is used -func (m *SnapshotArchivalCopyPolicyTarget) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ArchivalExternalTarget - if err := m.ArchivalExternalTarget.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *SnapshotArchivalCopyPolicyTarget) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SnapshotArchivalCopyPolicyTarget) UnmarshalBinary(b []byte) error { - var res SnapshotArchivalCopyPolicyTarget - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/snapshot_replication_copy_policy.go b/v1/models/snapshot_replication_copy_policy.go index f66155d4..5003899b 100644 --- a/v1/models/snapshot_replication_copy_policy.go +++ b/v1/models/snapshot_replication_copy_policy.go @@ -104,8 +104,10 @@ type SnapshotReplicationCopyPolicy struct { // Specifies a the source cluster id from which the data must be replicated. SourceClusterID *int64 `json:"sourceClusterId,omitempty"` - // target - Target *SnapshotReplicationCopyPolicyTarget `json:"target,omitempty"` + // Specifies the replication target to copy the Snapshots to. + Target struct { + ReplicationTargetSettings + } `json:"target,omitempty"` } // Validate validates this snapshot replication copy policy @@ -313,17 +315,6 @@ func (m *SnapshotReplicationCopyPolicy) validateTarget(formats strfmt.Registry) return nil } - if m.Target != nil { - if err := m.Target.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("target") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("target") - } - return err - } - } - return nil } @@ -422,22 +413,6 @@ func (m *SnapshotReplicationCopyPolicy) contextValidateRunTimeouts(ctx context.C func (m *SnapshotReplicationCopyPolicy) contextValidateTarget(ctx context.Context, formats strfmt.Registry) error { - if m.Target != nil { - - if swag.IsZero(m.Target) { // not required - return nil - } - - if err := m.Target.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("target") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("target") - } - return err - } - } - return nil } diff --git a/v1/models/snapshot_replication_copy_policy_target.go b/v1/models/snapshot_replication_copy_policy_target.go deleted file mode 100644 index 00ff8bd8..00000000 --- a/v1/models/snapshot_replication_copy_policy_target.go +++ /dev/null @@ -1,93 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// SnapshotReplicationCopyPolicyTarget Specifies the replication target to copy the Snapshots to. -// -// swagger:model snapshotReplicationCopyPolicyTarget -type SnapshotReplicationCopyPolicyTarget struct { - ReplicationTargetSettings -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *SnapshotReplicationCopyPolicyTarget) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 ReplicationTargetSettings - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.ReplicationTargetSettings = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m SnapshotReplicationCopyPolicyTarget) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.ReplicationTargetSettings) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this snapshot replication copy policy target -func (m *SnapshotReplicationCopyPolicyTarget) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ReplicationTargetSettings - if err := m.ReplicationTargetSettings.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this snapshot replication copy policy target based on the context it is used -func (m *SnapshotReplicationCopyPolicyTarget) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ReplicationTargetSettings - if err := m.ReplicationTargetSettings.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *SnapshotReplicationCopyPolicyTarget) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SnapshotReplicationCopyPolicyTarget) UnmarshalBinary(b []byte) error { - var res SnapshotReplicationCopyPolicyTarget - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/source_special_parameter.go b/v1/models/source_special_parameter.go index 81799bec..202f8c23 100644 --- a/v1/models/source_special_parameter.go +++ b/v1/models/source_special_parameter.go @@ -58,8 +58,20 @@ type SourceSpecialParameter struct { // deprecated: true TruncateExchangeLog *bool `json:"truncateExchangeLog,omitempty"` - // vm credentials - VMCredentials *SourceSpecialParameterVMCredentials `json:"vmCredentials,omitempty"` + // VM Credentials. + // + // Specifies the administrator credentials to log in to the + // guest Windows system of a VM that hosts the Microsoft Exchange Server. + // If truncateExchangeLog is set to true and the specified source + // is a VM, administrator credentials to log in to the guest Windows system + // of the VM must be provided to truncate the logs. + // This field is only applicable to Sources in the kVMware environment. + // This field is deprecated. Use the field in VmCredentials inside + // source specific parameter. + // deprecated: true + VMCredentials struct { + Credentials + } `json:"vmCredentials,omitempty"` // Specifies additional special parameters that are applicable only to // Protection Sources of 'kVMware' type. @@ -204,17 +216,6 @@ func (m *SourceSpecialParameter) validateVMCredentials(formats strfmt.Registry) return nil } - if m.VMCredentials != nil { - if err := m.VMCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmCredentials") - } - return err - } - } - return nil } @@ -382,22 +383,6 @@ func (m *SourceSpecialParameter) contextValidateSQLSpecialParameters(ctx context func (m *SourceSpecialParameter) contextValidateVMCredentials(ctx context.Context, formats strfmt.Registry) error { - if m.VMCredentials != nil { - - if swag.IsZero(m.VMCredentials) { // not required - return nil - } - - if err := m.VMCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmCredentials") - } - return err - } - } - return nil } diff --git a/v1/models/source_special_parameter_vm_credentials.go b/v1/models/source_special_parameter_vm_credentials.go deleted file mode 100644 index 81db14e2..00000000 --- a/v1/models/source_special_parameter_vm_credentials.go +++ /dev/null @@ -1,103 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// SourceSpecialParameterVMCredentials VM Credentials. -// -// Specifies the administrator credentials to log in to the -// guest Windows system of a VM that hosts the Microsoft Exchange Server. -// If truncateExchangeLog is set to true and the specified source -// is a VM, administrator credentials to log in to the guest Windows system -// of the VM must be provided to truncate the logs. -// This field is only applicable to Sources in the kVMware environment. -// This field is deprecated. Use the field in VmCredentials inside -// source specific parameter. -// deprecated: true -// -// swagger:model sourceSpecialParameterVmCredentials -type SourceSpecialParameterVMCredentials struct { - Credentials -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *SourceSpecialParameterVMCredentials) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 Credentials - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.Credentials = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m SourceSpecialParameterVMCredentials) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.Credentials) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this source special parameter Vm credentials -func (m *SourceSpecialParameterVMCredentials) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with Credentials - if err := m.Credentials.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this source special parameter Vm credentials based on the context it is used -func (m *SourceSpecialParameterVMCredentials) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with Credentials - if err := m.Credentials.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *SourceSpecialParameterVMCredentials) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SourceSpecialParameterVMCredentials) UnmarshalBinary(b []byte) error { - var res SourceSpecialParameterVMCredentials - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/stop_remote_vault_search_job_parameters.go b/v1/models/stop_remote_vault_search_job_parameters.go index 3f144587..d1732182 100644 --- a/v1/models/stop_remote_vault_search_job_parameters.go +++ b/v1/models/stop_remote_vault_search_job_parameters.go @@ -20,8 +20,10 @@ import ( // swagger:model StopRemoteVaultSearchJobParameters type StopRemoteVaultSearchJobParameters struct { - // search job Uid - SearchJobUID *StopRemoteVaultSearchJobParametersSearchJobUID `json:"searchJobUid,omitempty"` + // Specifies the unique id of the Remote Vault search job in progress. + SearchJobUID struct { + UniversalID + } `json:"searchJobUid,omitempty"` } // Validate validates this stop remote vault search job parameters @@ -43,17 +45,6 @@ func (m *StopRemoteVaultSearchJobParameters) validateSearchJobUID(formats strfmt return nil } - if m.SearchJobUID != nil { - if err := m.SearchJobUID.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("searchJobUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("searchJobUid") - } - return err - } - } - return nil } @@ -73,22 +64,6 @@ func (m *StopRemoteVaultSearchJobParameters) ContextValidate(ctx context.Context func (m *StopRemoteVaultSearchJobParameters) contextValidateSearchJobUID(ctx context.Context, formats strfmt.Registry) error { - if m.SearchJobUID != nil { - - if swag.IsZero(m.SearchJobUID) { // not required - return nil - } - - if err := m.SearchJobUID.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("searchJobUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("searchJobUid") - } - return err - } - } - return nil } diff --git a/v1/models/stop_remote_vault_search_job_parameters_search_job_uid.go b/v1/models/stop_remote_vault_search_job_parameters_search_job_uid.go deleted file mode 100644 index 5f2fd3f8..00000000 --- a/v1/models/stop_remote_vault_search_job_parameters_search_job_uid.go +++ /dev/null @@ -1,93 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// StopRemoteVaultSearchJobParametersSearchJobUID Specifies the unique id of the Remote Vault search job in progress. -// -// swagger:model stopRemoteVaultSearchJobParametersSearchJobUid -type StopRemoteVaultSearchJobParametersSearchJobUID struct { - UniversalID -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *StopRemoteVaultSearchJobParametersSearchJobUID) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 UniversalID - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.UniversalID = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m StopRemoteVaultSearchJobParametersSearchJobUID) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.UniversalID) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this stop remote vault search job parameters search job Uid -func (m *StopRemoteVaultSearchJobParametersSearchJobUID) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UniversalID - if err := m.UniversalID.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this stop remote vault search job parameters search job Uid based on the context it is used -func (m *StopRemoteVaultSearchJobParametersSearchJobUID) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UniversalID - if err := m.UniversalID.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *StopRemoteVaultSearchJobParametersSearchJobUID) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *StopRemoteVaultSearchJobParametersSearchJobUID) UnmarshalBinary(b []byte) error { - var res StopRemoteVaultSearchJobParametersSearchJobUID - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/string_entity_ids.go b/v1/models/string_entity_ids.go new file mode 100644 index 00000000..9d51a42c --- /dev/null +++ b/v1/models/string_entity_ids.go @@ -0,0 +1,307 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// StringEntityIds Specifies the model to uniquely id an entity. +// +// This model also specifies the previous ids for a given entity." +// +// swagger:model StringEntityIds +type StringEntityIds struct { + + // Specifies the latest string entity id. This + // string id may or may not be same for a given entity across clusters. + // For version 0, the id is guaranteed to be unique across all clusters, + // but not same for the same entity across clusters." + LatestID *VersionInfo `json:"latestId,omitempty"` + + // Specifies the latest source-generated ID for an entity. + // It provides the most current identifier assigned by the primary source + // system. + LatestSourceGeneratedIds []*EntityIdentifiers `json:"latestSourceGeneratedIds"` + + // Specifies all the StringIds previously assigned to this + // entity. Note that it doesn't contain the latest id. + PreviousIds []*VersionInfo `json:"previousIds"` + + // Specifies a list of previously assigned source-generated IDs for + // an entity. It helps in tracking the historical identifiers that were + // assigned by the primary source system. This can be useful for audit + // trails, debugging, or migration purposes. + PreviousSourceGeneratedIds []*EntityIdentifiers `json:"previousSourceGeneratedIds"` +} + +// Validate validates this string entity ids +func (m *StringEntityIds) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLatestID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLatestSourceGeneratedIds(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePreviousIds(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePreviousSourceGeneratedIds(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *StringEntityIds) validateLatestID(formats strfmt.Registry) error { + if swag.IsZero(m.LatestID) { // not required + return nil + } + + if m.LatestID != nil { + if err := m.LatestID.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("latestId") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("latestId") + } + return err + } + } + + return nil +} + +func (m *StringEntityIds) validateLatestSourceGeneratedIds(formats strfmt.Registry) error { + if swag.IsZero(m.LatestSourceGeneratedIds) { // not required + return nil + } + + for i := 0; i < len(m.LatestSourceGeneratedIds); i++ { + if swag.IsZero(m.LatestSourceGeneratedIds[i]) { // not required + continue + } + + if m.LatestSourceGeneratedIds[i] != nil { + if err := m.LatestSourceGeneratedIds[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("latestSourceGeneratedIds" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("latestSourceGeneratedIds" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *StringEntityIds) validatePreviousIds(formats strfmt.Registry) error { + if swag.IsZero(m.PreviousIds) { // not required + return nil + } + + for i := 0; i < len(m.PreviousIds); i++ { + if swag.IsZero(m.PreviousIds[i]) { // not required + continue + } + + if m.PreviousIds[i] != nil { + if err := m.PreviousIds[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("previousIds" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("previousIds" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *StringEntityIds) validatePreviousSourceGeneratedIds(formats strfmt.Registry) error { + if swag.IsZero(m.PreviousSourceGeneratedIds) { // not required + return nil + } + + for i := 0; i < len(m.PreviousSourceGeneratedIds); i++ { + if swag.IsZero(m.PreviousSourceGeneratedIds[i]) { // not required + continue + } + + if m.PreviousSourceGeneratedIds[i] != nil { + if err := m.PreviousSourceGeneratedIds[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("previousSourceGeneratedIds" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("previousSourceGeneratedIds" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this string entity ids based on the context it is used +func (m *StringEntityIds) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateLatestID(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLatestSourceGeneratedIds(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidatePreviousIds(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidatePreviousSourceGeneratedIds(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *StringEntityIds) contextValidateLatestID(ctx context.Context, formats strfmt.Registry) error { + + if m.LatestID != nil { + + if swag.IsZero(m.LatestID) { // not required + return nil + } + + if err := m.LatestID.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("latestId") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("latestId") + } + return err + } + } + + return nil +} + +func (m *StringEntityIds) contextValidateLatestSourceGeneratedIds(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.LatestSourceGeneratedIds); i++ { + + if m.LatestSourceGeneratedIds[i] != nil { + + if swag.IsZero(m.LatestSourceGeneratedIds[i]) { // not required + return nil + } + + if err := m.LatestSourceGeneratedIds[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("latestSourceGeneratedIds" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("latestSourceGeneratedIds" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *StringEntityIds) contextValidatePreviousIds(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.PreviousIds); i++ { + + if m.PreviousIds[i] != nil { + + if swag.IsZero(m.PreviousIds[i]) { // not required + return nil + } + + if err := m.PreviousIds[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("previousIds" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("previousIds" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *StringEntityIds) contextValidatePreviousSourceGeneratedIds(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.PreviousSourceGeneratedIds); i++ { + + if m.PreviousSourceGeneratedIds[i] != nil { + + if swag.IsZero(m.PreviousSourceGeneratedIds[i]) { // not required + return nil + } + + if err := m.PreviousSourceGeneratedIds[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("previousSourceGeneratedIds" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("previousSourceGeneratedIds" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *StringEntityIds) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *StringEntityIds) UnmarshalBinary(b []byte) error { + var res StringEntityIds + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/v1/models/string_entity_ids_proto.go b/v1/models/string_entity_ids_proto.go index 888eeafe..f808c55a 100644 --- a/v1/models/string_entity_ids_proto.go +++ b/v1/models/string_entity_ids_proto.go @@ -7,6 +7,7 @@ package models import ( "context" + "strconv" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -18,8 +19,31 @@ import ( // swagger:model StringEntityIdsProto type StringEntityIdsProto struct { - // The latest string id. + // String entity id generated by magneto for the given entity. This + // string id may or may not be same for a given entity across clusters. + // For version 0, the id is guaranteed to be unique across all clusters, + // but not same for the same entity across clusters. i.e. VM1 can have id + // "str1" on cluster1 and "str2" on cluster2. ids "str1", "str2" will not + // belong to any otherentity on another cluster. LatestID *StringEntityIdsProtoStringID `json:"latestId,omitempty"` + + // This message contains the latest source-generated ID for an entity. + // It provides the most current identifier assigned by the primary source + // system. + LatestSourceGeneratedIds *StringEntityIdsProtoSourceGeneratedStringIds `json:"latestSourceGeneratedIds,omitempty"` + + // Repeated field containing all the StringIds previously assigned to this + // entity. Note that it doesn't contain the latest id. + // THIS IS COMMENTED AS ONLY ONE GUID STRING ID IS SUPPORTED CURRENTLY. THIS + // SHOULD BE USED WHEN WE MOVE TO HASH BASED IDS. + PreviousIds []*StringEntityIdsProtoStringID `json:"previousIds"` + + // This field stores a list of previously assigned source-generated IDs for + // an entity. + // It helps in tracking the historical identifiers that were assigned by the + // primary source system. This can be useful for audit trails, debugging, or + // migration purposes. + PreviousSourceGeneratedIds *StringEntityIdsProtoSourceGeneratedStringIds `json:"previousSourceGeneratedIds,omitempty"` } // Validate validates this string entity ids proto @@ -30,6 +54,18 @@ func (m *StringEntityIdsProto) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateLatestSourceGeneratedIds(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePreviousIds(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePreviousSourceGeneratedIds(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -55,6 +91,70 @@ func (m *StringEntityIdsProto) validateLatestID(formats strfmt.Registry) error { return nil } +func (m *StringEntityIdsProto) validateLatestSourceGeneratedIds(formats strfmt.Registry) error { + if swag.IsZero(m.LatestSourceGeneratedIds) { // not required + return nil + } + + if m.LatestSourceGeneratedIds != nil { + if err := m.LatestSourceGeneratedIds.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("latestSourceGeneratedIds") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("latestSourceGeneratedIds") + } + return err + } + } + + return nil +} + +func (m *StringEntityIdsProto) validatePreviousIds(formats strfmt.Registry) error { + if swag.IsZero(m.PreviousIds) { // not required + return nil + } + + for i := 0; i < len(m.PreviousIds); i++ { + if swag.IsZero(m.PreviousIds[i]) { // not required + continue + } + + if m.PreviousIds[i] != nil { + if err := m.PreviousIds[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("previousIds" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("previousIds" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *StringEntityIdsProto) validatePreviousSourceGeneratedIds(formats strfmt.Registry) error { + if swag.IsZero(m.PreviousSourceGeneratedIds) { // not required + return nil + } + + if m.PreviousSourceGeneratedIds != nil { + if err := m.PreviousSourceGeneratedIds.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("previousSourceGeneratedIds") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("previousSourceGeneratedIds") + } + return err + } + } + + return nil +} + // ContextValidate validate this string entity ids proto based on the context it is used func (m *StringEntityIdsProto) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error @@ -63,6 +163,18 @@ func (m *StringEntityIdsProto) ContextValidate(ctx context.Context, formats strf res = append(res, err) } + if err := m.contextValidateLatestSourceGeneratedIds(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidatePreviousIds(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidatePreviousSourceGeneratedIds(ctx, formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -90,6 +202,73 @@ func (m *StringEntityIdsProto) contextValidateLatestID(ctx context.Context, form return nil } +func (m *StringEntityIdsProto) contextValidateLatestSourceGeneratedIds(ctx context.Context, formats strfmt.Registry) error { + + if m.LatestSourceGeneratedIds != nil { + + if swag.IsZero(m.LatestSourceGeneratedIds) { // not required + return nil + } + + if err := m.LatestSourceGeneratedIds.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("latestSourceGeneratedIds") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("latestSourceGeneratedIds") + } + return err + } + } + + return nil +} + +func (m *StringEntityIdsProto) contextValidatePreviousIds(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.PreviousIds); i++ { + + if m.PreviousIds[i] != nil { + + if swag.IsZero(m.PreviousIds[i]) { // not required + return nil + } + + if err := m.PreviousIds[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("previousIds" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("previousIds" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *StringEntityIdsProto) contextValidatePreviousSourceGeneratedIds(ctx context.Context, formats strfmt.Registry) error { + + if m.PreviousSourceGeneratedIds != nil { + + if swag.IsZero(m.PreviousSourceGeneratedIds) { // not required + return nil + } + + if err := m.PreviousSourceGeneratedIds.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("previousSourceGeneratedIds") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("previousSourceGeneratedIds") + } + return err + } + } + + return nil +} + // MarshalBinary interface implementation func (m *StringEntityIdsProto) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/v1/models/string_entity_ids_proto_source_generated_string_ids.go b/v1/models/string_entity_ids_proto_source_generated_string_ids.go new file mode 100644 index 00000000..0e77fe19 --- /dev/null +++ b/v1/models/string_entity_ids_proto_source_generated_string_ids.go @@ -0,0 +1,129 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// StringEntityIdsProtoSourceGeneratedStringIds string entity ids proto source generated string ids +// +// swagger:model StringEntityIdsProto_SourceGeneratedStringIds +type StringEntityIdsProtoSourceGeneratedStringIds struct { + + // A collection of various identifiers generated by the primary source + // system. These identifiers can vary depending on the originating system. + // Examples include: + // A universally unique identifier (UUID) generated by VMware vCenter. + // An instance ID from Microsoft SQL Server. + // A mailbox ID generated by Microsoft Office 365. + // These IDs uniquely distinguish an entity within the context of the + // source system, ensuring accurate tracking. + // Note: Cohesity does not guarantee the uniqueness of these IDs. + EntityIdentifiers []*StringEntityIdsProtoSourceGeneratedStringIdsEntityIdentifier `json:"entityIdentifiers"` +} + +// Validate validates this string entity ids proto source generated string ids +func (m *StringEntityIdsProtoSourceGeneratedStringIds) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateEntityIdentifiers(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *StringEntityIdsProtoSourceGeneratedStringIds) validateEntityIdentifiers(formats strfmt.Registry) error { + if swag.IsZero(m.EntityIdentifiers) { // not required + return nil + } + + for i := 0; i < len(m.EntityIdentifiers); i++ { + if swag.IsZero(m.EntityIdentifiers[i]) { // not required + continue + } + + if m.EntityIdentifiers[i] != nil { + if err := m.EntityIdentifiers[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("entityIdentifiers" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("entityIdentifiers" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this string entity ids proto source generated string ids based on the context it is used +func (m *StringEntityIdsProtoSourceGeneratedStringIds) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateEntityIdentifiers(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *StringEntityIdsProtoSourceGeneratedStringIds) contextValidateEntityIdentifiers(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.EntityIdentifiers); i++ { + + if m.EntityIdentifiers[i] != nil { + + if swag.IsZero(m.EntityIdentifiers[i]) { // not required + return nil + } + + if err := m.EntityIdentifiers[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("entityIdentifiers" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("entityIdentifiers" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *StringEntityIdsProtoSourceGeneratedStringIds) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *StringEntityIdsProtoSourceGeneratedStringIds) UnmarshalBinary(b []byte) error { + var res StringEntityIdsProtoSourceGeneratedStringIds + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/v1/models/string_entity_ids_proto_source_generated_string_ids_entity_identifier.go b/v1/models/string_entity_ids_proto_source_generated_string_ids_entity_identifier.go new file mode 100644 index 00000000..e5969a70 --- /dev/null +++ b/v1/models/string_entity_ids_proto_source_generated_string_ids_entity_identifier.go @@ -0,0 +1,67 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// StringEntityIdsProtoSourceGeneratedStringIdsEntityIdentifier string entity ids proto source generated string ids entity identifier +// +// swagger:model StringEntityIdsProto_SourceGeneratedStringIds_EntityIdentifier +type StringEntityIdsProtoSourceGeneratedStringIdsEntityIdentifier struct { + + // Link to documentation or additional information about the entity. This + // URL can be used to access more detailed information, guidelines, or + // metadata related to the entity id. It helps in understanding the + // context or usage of the entity id. + DocumentationLink *string `json:"documentationLink,omitempty"` + + // The type of identifier. For example, a Virtual Machine (VM) can be + // identified through various types of IDs, such as UUID, Managed Object + // Reference (moref), or other unique identifiers. + Key *string `json:"key,omitempty"` + + // The value of the identifier corresponding to the type specified in the + // key. + Value *string `json:"value,omitempty"` + + // Denotes the version number associated with this EntityIdentifier. The + // structure or the logic to generate EntityIdentifier message can change + // (infrequently) across software versions. + Version *int64 `json:"version,omitempty"` +} + +// Validate validates this string entity ids proto source generated string ids entity identifier +func (m *StringEntityIdsProtoSourceGeneratedStringIdsEntityIdentifier) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this string entity ids proto source generated string ids entity identifier based on context it is used +func (m *StringEntityIdsProtoSourceGeneratedStringIdsEntityIdentifier) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *StringEntityIdsProtoSourceGeneratedStringIdsEntityIdentifier) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *StringEntityIdsProtoSourceGeneratedStringIdsEntityIdentifier) UnmarshalBinary(b []byte) error { + var res StringEntityIdsProtoSourceGeneratedStringIdsEntityIdentifier + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/v1/models/string_entity_ids_proto_string_id.go b/v1/models/string_entity_ids_proto_string_id.go index 106d24e4..7c829cfa 100644 --- a/v1/models/string_entity_ids_proto_string_id.go +++ b/v1/models/string_entity_ids_proto_string_id.go @@ -18,13 +18,14 @@ import ( // swagger:model StringEntityIdsProto_StringId type StringEntityIdsProtoStringID struct { - // String entity id generated by magneto for the given entity. This string - // id may or may not be same for a given entity across clusters. - // For version 0, the id is guaranteed to be unique across all clusters, - // but not same for the same entity across clusters. i.e. VM1 can have id - // "str1" on cluster1 and "str2" on cluster2. ids "str1", "str2" will not - // belong to any otherentity on another cluster. + // Unique identifier for the string entity. This field is used to + // uniquely distinguish different entities within the system. ID *string `json:"id,omitempty"` + + // Version number associated with the string id. This can be used to track + // different versions of the entity id over time. The string ID assigned to + // the an entity may change (infrequently) across software versions. + Version *int64 `json:"version,omitempty"` } // Validate validates this string entity ids proto string Id diff --git a/v1/models/time_of_a_week.go b/v1/models/time_of_a_week.go index fa0f9286..3443d21d 100644 --- a/v1/models/time_of_a_week.go +++ b/v1/models/time_of_a_week.go @@ -35,16 +35,24 @@ type TimeOfAWeek struct { // Specifies a day in a week such as 'kSunday', 'kMonday', etc. Days []string `json:"days"` - // end time - EndTime *TimeOfAWeekEndTime `json:"endTime,omitempty"` + // End Time. + // + // Specifies the end time for the daily time period. + EndTime struct { + TimeOfDay + } `json:"endTime,omitempty"` // All Day. // // Specifies that time range is applied for entire day. IsAllDay *bool `json:"isAllDay,omitempty"` - // start time - StartTime *TimeOfAWeekStartTime `json:"startTime,omitempty"` + // Start Time. + // + // Specifies the start time for the daily time period. + StartTime struct { + TimeOfDay + } `json:"startTime,omitempty"` } // Validate validates this time of a week @@ -110,17 +118,6 @@ func (m *TimeOfAWeek) validateEndTime(formats strfmt.Registry) error { return nil } - if m.EndTime != nil { - if err := m.EndTime.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("endTime") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("endTime") - } - return err - } - } - return nil } @@ -129,17 +126,6 @@ func (m *TimeOfAWeek) validateStartTime(formats strfmt.Registry) error { return nil } - if m.StartTime != nil { - if err := m.StartTime.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("startTime") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("startTime") - } - return err - } - } - return nil } @@ -163,43 +149,11 @@ func (m *TimeOfAWeek) ContextValidate(ctx context.Context, formats strfmt.Regist func (m *TimeOfAWeek) contextValidateEndTime(ctx context.Context, formats strfmt.Registry) error { - if m.EndTime != nil { - - if swag.IsZero(m.EndTime) { // not required - return nil - } - - if err := m.EndTime.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("endTime") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("endTime") - } - return err - } - } - return nil } func (m *TimeOfAWeek) contextValidateStartTime(ctx context.Context, formats strfmt.Registry) error { - if m.StartTime != nil { - - if swag.IsZero(m.StartTime) { // not required - return nil - } - - if err := m.StartTime.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("startTime") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("startTime") - } - return err - } - } - return nil } diff --git a/v1/models/time_of_a_week_end_time.go b/v1/models/time_of_a_week_end_time.go deleted file mode 100644 index 938ad287..00000000 --- a/v1/models/time_of_a_week_end_time.go +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// TimeOfAWeekEndTime End Time. -// -// Specifies the end time for the daily time period. -// -// swagger:model timeOfAWeekEndTime -type TimeOfAWeekEndTime struct { - TimeOfDay -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *TimeOfAWeekEndTime) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 TimeOfDay - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.TimeOfDay = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m TimeOfAWeekEndTime) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.TimeOfDay) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this time of a week end time -func (m *TimeOfAWeekEndTime) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with TimeOfDay - if err := m.TimeOfDay.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this time of a week end time based on the context it is used -func (m *TimeOfAWeekEndTime) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with TimeOfDay - if err := m.TimeOfDay.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *TimeOfAWeekEndTime) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TimeOfAWeekEndTime) UnmarshalBinary(b []byte) error { - var res TimeOfAWeekEndTime - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/time_of_a_week_start_time.go b/v1/models/time_of_a_week_start_time.go deleted file mode 100644 index 070de5e2..00000000 --- a/v1/models/time_of_a_week_start_time.go +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// TimeOfAWeekStartTime Start Time. -// -// Specifies the start time for the daily time period. -// -// swagger:model timeOfAWeekStartTime -type TimeOfAWeekStartTime struct { - TimeOfDay -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *TimeOfAWeekStartTime) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 TimeOfDay - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.TimeOfDay = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m TimeOfAWeekStartTime) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.TimeOfDay) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this time of a week start time -func (m *TimeOfAWeekStartTime) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with TimeOfDay - if err := m.TimeOfDay.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this time of a week start time based on the context it is used -func (m *TimeOfAWeekStartTime) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with TimeOfDay - if err := m.TimeOfDay.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *TimeOfAWeekStartTime) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TimeOfAWeekStartTime) UnmarshalBinary(b []byte) error { - var res TimeOfAWeekStartTime - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/update_cluster_params.go b/v1/models/update_cluster_params.go index 520d644b..0e0e6217 100644 --- a/v1/models/update_cluster_params.go +++ b/v1/models/update_cluster_params.go @@ -33,6 +33,9 @@ type UpdateClusterParams struct { // The subnet for Athena apps. AppsSubnet *Subnet `json:"appsSubnet,omitempty"` + // To attempt agent connection on port 21213 first + AttemptAgentPortsUpgrade *bool `json:"attemptAgentPortsUpgrade,omitempty"` + // Specifies whether UI banner is enabled on the cluster or not. When banner // is enabled, UI will make an additional API call to fetch the banner and // show at the login page. @@ -185,6 +188,9 @@ type UpdateClusterParams struct { // Specifies if the cluster is in Turbo mode. TurboMode *bool `json:"turboMode,omitempty"` + // To use default ports 50051 & 21213 + UseDefaultAgentPorts *bool `json:"useDefaultAgentPorts,omitempty"` + // Specifies whether to enable Heimdall which tells whether services should // use temporary fleet instances to mount disks by talking to Heimdall. UseHeimdall *bool `json:"useHeimdall,omitempty"` diff --git a/v1/models/update_protection_job_run.go b/v1/models/update_protection_job_run.go index ae1f9276..4148fd2d 100644 --- a/v1/models/update_protection_job_run.go +++ b/v1/models/update_protection_job_run.go @@ -26,8 +26,10 @@ type UpdateProtectionJobRun struct { // retention. CopyRunTargets []*RunJobSnapshotTarget `json:"copyRunTargets"` - // job Uid - JobUID *UpdateProtectionJobRunJobUID `json:"jobUid,omitempty"` + // Specifies a unique universal id for the Job. + JobUID struct { + UniversalID + } `json:"jobUid,omitempty"` // Specifies the start time of the Job Run to update. The start time // is specified as a Unix epoch Timestamp (in microseconds). @@ -91,17 +93,6 @@ func (m *UpdateProtectionJobRun) validateJobUID(formats strfmt.Registry) error { return nil } - if m.JobUID != nil { - if err := m.JobUID.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("jobUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("jobUid") - } - return err - } - } - return nil } @@ -150,22 +141,6 @@ func (m *UpdateProtectionJobRun) contextValidateCopyRunTargets(ctx context.Conte func (m *UpdateProtectionJobRun) contextValidateJobUID(ctx context.Context, formats strfmt.Registry) error { - if m.JobUID != nil { - - if swag.IsZero(m.JobUID) { // not required - return nil - } - - if err := m.JobUID.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("jobUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("jobUid") - } - return err - } - } - return nil } diff --git a/v1/models/update_protection_job_run_job_uid.go b/v1/models/update_protection_job_run_job_uid.go deleted file mode 100644 index 9f6c0e69..00000000 --- a/v1/models/update_protection_job_run_job_uid.go +++ /dev/null @@ -1,93 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// UpdateProtectionJobRunJobUID Specifies a unique universal id for the Job. -// -// swagger:model updateProtectionJobRunJobUid -type UpdateProtectionJobRunJobUID struct { - UniversalID -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *UpdateProtectionJobRunJobUID) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 UniversalID - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.UniversalID = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m UpdateProtectionJobRunJobUID) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.UniversalID) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this update protection job run job Uid -func (m *UpdateProtectionJobRunJobUID) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UniversalID - if err := m.UniversalID.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this update protection job run job Uid based on the context it is used -func (m *UpdateProtectionJobRunJobUID) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UniversalID - if err := m.UniversalID.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateProtectionJobRunJobUID) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateProtectionJobRunJobUID) UnmarshalBinary(b []byte) error { - var res UpdateProtectionJobRunJobUID - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/update_protection_source_parameters.go b/v1/models/update_protection_source_parameters.go index 4d184723..16806f00 100644 --- a/v1/models/update_protection_source_parameters.go +++ b/v1/models/update_protection_source_parameters.go @@ -135,8 +135,13 @@ type UpdateProtectionSourceParameters struct { // due to low space. MinimumFreeSpaceGB *int64 `json:"minimumFreeSpaceGB,omitempty"` - // nas mount credentials - NasMountCredentials *UpdateProtectionSourceParametersNasMountCredentials `json:"nasMountCredentials,omitempty"` + // NAS Server Credentials. + // + // Specifies the server credentials to connect to a NetApp server. + // This field is required for mounting SMB volumes on NetApp servers. + NasMountCredentials struct { + NasMountCredentialParams + } `json:"nasMountCredentials,omitempty"` // Office365 Source Credentials. // @@ -186,8 +191,10 @@ type UpdateProtectionSourceParameters struct { // input fields. All other fields provided as input will be ignored. Subnets []*Subnet `json:"subnets"` - // throttling policy - ThrottlingPolicy *UpdateProtectionSourceParametersThrottlingPolicy `json:"throttlingPolicy,omitempty"` + // Specifies the throttling policy that should be applied to this Source. + ThrottlingPolicy struct { + ThrottlingPolicyParameters + } `json:"throttlingPolicy,omitempty"` // Array of Throttling Policy Overrides for Datastores. // @@ -585,17 +592,6 @@ func (m *UpdateProtectionSourceParameters) validateNasMountCredentials(formats s return nil } - if m.NasMountCredentials != nil { - if err := m.NasMountCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nasMountCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nasMountCredentials") - } - return err - } - } - return nil } @@ -701,17 +697,6 @@ func (m *UpdateProtectionSourceParameters) validateThrottlingPolicy(formats strf return nil } - if m.ThrottlingPolicy != nil { - if err := m.ThrottlingPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("throttlingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("throttlingPolicy") - } - return err - } - } - return nil } @@ -1054,22 +1039,6 @@ func (m *UpdateProtectionSourceParameters) contextValidateKubernetesParams(ctx c func (m *UpdateProtectionSourceParameters) contextValidateNasMountCredentials(ctx context.Context, formats strfmt.Registry) error { - if m.NasMountCredentials != nil { - - if swag.IsZero(m.NasMountCredentials) { // not required - return nil - } - - if err := m.NasMountCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nasMountCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nasMountCredentials") - } - return err - } - } - return nil } @@ -1171,22 +1140,6 @@ func (m *UpdateProtectionSourceParameters) contextValidateSubnets(ctx context.Co func (m *UpdateProtectionSourceParameters) contextValidateThrottlingPolicy(ctx context.Context, formats strfmt.Registry) error { - if m.ThrottlingPolicy != nil { - - if swag.IsZero(m.ThrottlingPolicy) { // not required - return nil - } - - if err := m.ThrottlingPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("throttlingPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("throttlingPolicy") - } - return err - } - } - return nil } diff --git a/v1/models/update_protection_source_parameters_nas_mount_credentials.go b/v1/models/update_protection_source_parameters_nas_mount_credentials.go deleted file mode 100644 index 730a96a6..00000000 --- a/v1/models/update_protection_source_parameters_nas_mount_credentials.go +++ /dev/null @@ -1,96 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// UpdateProtectionSourceParametersNasMountCredentials NAS Server Credentials. -// -// Specifies the server credentials to connect to a NetApp server. -// This field is required for mounting SMB volumes on NetApp servers. -// -// swagger:model updateProtectionSourceParametersNasMountCredentials -type UpdateProtectionSourceParametersNasMountCredentials struct { - NasMountCredentialParams -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *UpdateProtectionSourceParametersNasMountCredentials) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 NasMountCredentialParams - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.NasMountCredentialParams = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m UpdateProtectionSourceParametersNasMountCredentials) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.NasMountCredentialParams) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this update protection source parameters nas mount credentials -func (m *UpdateProtectionSourceParametersNasMountCredentials) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with NasMountCredentialParams - if err := m.NasMountCredentialParams.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this update protection source parameters nas mount credentials based on the context it is used -func (m *UpdateProtectionSourceParametersNasMountCredentials) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with NasMountCredentialParams - if err := m.NasMountCredentialParams.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateProtectionSourceParametersNasMountCredentials) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateProtectionSourceParametersNasMountCredentials) UnmarshalBinary(b []byte) error { - var res UpdateProtectionSourceParametersNasMountCredentials - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/update_protection_source_parameters_throttling_policy.go b/v1/models/update_protection_source_parameters_throttling_policy.go deleted file mode 100644 index be74c707..00000000 --- a/v1/models/update_protection_source_parameters_throttling_policy.go +++ /dev/null @@ -1,93 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// UpdateProtectionSourceParametersThrottlingPolicy Specifies the throttling policy that should be applied to this Source. -// -// swagger:model updateProtectionSourceParametersThrottlingPolicy -type UpdateProtectionSourceParametersThrottlingPolicy struct { - ThrottlingPolicyParameters -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *UpdateProtectionSourceParametersThrottlingPolicy) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 ThrottlingPolicyParameters - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.ThrottlingPolicyParameters = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m UpdateProtectionSourceParametersThrottlingPolicy) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.ThrottlingPolicyParameters) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this update protection source parameters throttling policy -func (m *UpdateProtectionSourceParametersThrottlingPolicy) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ThrottlingPolicyParameters - if err := m.ThrottlingPolicyParameters.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this update protection source parameters throttling policy based on the context it is used -func (m *UpdateProtectionSourceParametersThrottlingPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with ThrottlingPolicyParameters - if err := m.ThrottlingPolicyParameters.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateProtectionSourceParametersThrottlingPolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateProtectionSourceParametersThrottlingPolicy) UnmarshalBinary(b []byte) error { - var res UpdateProtectionSourceParametersThrottlingPolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/update_view_param.go b/v1/models/update_view_param.go index abeafafa..6102eb2e 100644 --- a/v1/models/update_view_param.go +++ b/v1/models/update_view_param.go @@ -99,8 +99,24 @@ type UpdateViewParam struct { // write to this view if this is set to true. IsReadOnly *bool `json:"isReadOnly,omitempty"` - // logical quota - LogicalQuota *UpdateViewParamLogicalQuota `json:"logicalQuota,omitempty"` + // Specifies an optional logical quota limit (in bytes) for the usage allowed + // on this View. + // (Logical data is when the data is fully hydrated and expanded.) + // This limit overrides the limit inherited from the Storage Domain + // (View Box) (if set). + // If logicalQuota is nil, the limit is inherited from the + // Storage Domain (View Box) (if set). + // A new write is not allowed if the Storage Domain (View Box) will exceed the + // specified quota. + // However, it takes time for the Cohesity Cluster to calculate + // the usage across Nodes, so the limit may be exceeded by a small amount. + // In addition, if the limit is increased or data is removed, + // there may be a delay before the Cohesity Cluster allows more data + // to be written to the View, as the Cluster is calculating the usage + // across Nodes. + LogicalQuota struct { + QuotaPolicy + } `json:"logicalQuota,omitempty"` // Array of Netgroups. // @@ -126,7 +142,7 @@ type UpdateViewParam struct { // global setting. OverrideGlobalWhitelist *bool `json:"overrideGlobalWhitelist,omitempty"` - // Specifies the supported Protocols for the View. + // Deprecated: Specifies the supported Protocols for the View. // 'kAll' enables protocol access to following three views: NFS, SMB and S3. // 'kNFSOnly' enables protocol access to NFS only. // 'kSMBOnly' enables protocol access to SMB only. @@ -183,6 +199,9 @@ type UpdateViewParam struct { // Specifies the pinning config of this view. ViewPinningConfig *ViewPinningConfig `json:"viewPinningConfig,omitempty"` + + // Specifies the supported Protocols for the View. + ViewProtocol []*ViewProtocol `json:"viewProtocol"` } // Validate validates this update view param @@ -253,6 +272,10 @@ func (m *UpdateViewParam) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateViewProtocol(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -321,17 +344,6 @@ func (m *UpdateViewParam) validateLogicalQuota(formats strfmt.Registry) error { return nil } - if m.LogicalQuota != nil { - if err := m.LogicalQuota.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("logicalQuota") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("logicalQuota") - } - return err - } - } - return nil } @@ -645,6 +657,32 @@ func (m *UpdateViewParam) validateViewPinningConfig(formats strfmt.Registry) err return nil } +func (m *UpdateViewParam) validateViewProtocol(formats strfmt.Registry) error { + if swag.IsZero(m.ViewProtocol) { // not required + return nil + } + + for i := 0; i < len(m.ViewProtocol); i++ { + if swag.IsZero(m.ViewProtocol[i]) { // not required + continue + } + + if m.ViewProtocol[i] != nil { + if err := m.ViewProtocol[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("viewProtocol" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("viewProtocol" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + // ContextValidate validate this update view param based on the context it is used func (m *UpdateViewParam) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error @@ -705,6 +743,10 @@ func (m *UpdateViewParam) ContextValidate(ctx context.Context, formats strfmt.Re res = append(res, err) } + if err := m.contextValidateViewProtocol(ctx, formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -776,22 +818,6 @@ func (m *UpdateViewParam) contextValidateFileLockConfig(ctx context.Context, for func (m *UpdateViewParam) contextValidateLogicalQuota(ctx context.Context, formats strfmt.Registry) error { - if m.LogicalQuota != nil { - - if swag.IsZero(m.LogicalQuota) { // not required - return nil - } - - if err := m.LogicalQuota.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("logicalQuota") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("logicalQuota") - } - return err - } - } - return nil } @@ -1017,6 +1043,31 @@ func (m *UpdateViewParam) contextValidateViewPinningConfig(ctx context.Context, return nil } +func (m *UpdateViewParam) contextValidateViewProtocol(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.ViewProtocol); i++ { + + if m.ViewProtocol[i] != nil { + + if swag.IsZero(m.ViewProtocol[i]) { // not required + return nil + } + + if err := m.ViewProtocol[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("viewProtocol" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("viewProtocol" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + // MarshalBinary interface implementation func (m *UpdateViewParam) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/v1/models/update_view_param_logical_quota.go b/v1/models/update_view_param_logical_quota.go deleted file mode 100644 index 56bca2f6..00000000 --- a/v1/models/update_view_param_logical_quota.go +++ /dev/null @@ -1,107 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// UpdateViewParamLogicalQuota Specifies an optional logical quota limit (in bytes) for the usage allowed -// on this View. -// (Logical data is when the data is fully hydrated and expanded.) -// This limit overrides the limit inherited from the Storage Domain -// (View Box) (if set). -// If logicalQuota is nil, the limit is inherited from the -// Storage Domain (View Box) (if set). -// A new write is not allowed if the Storage Domain (View Box) will exceed the -// specified quota. -// However, it takes time for the Cohesity Cluster to calculate -// the usage across Nodes, so the limit may be exceeded by a small amount. -// In addition, if the limit is increased or data is removed, -// there may be a delay before the Cohesity Cluster allows more data -// to be written to the View, as the Cluster is calculating the usage -// across Nodes. -// -// swagger:model updateViewParamLogicalQuota -type UpdateViewParamLogicalQuota struct { - QuotaPolicy -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *UpdateViewParamLogicalQuota) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 QuotaPolicy - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.QuotaPolicy = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m UpdateViewParamLogicalQuota) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.QuotaPolicy) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this update view param logical quota -func (m *UpdateViewParamLogicalQuota) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with QuotaPolicy - if err := m.QuotaPolicy.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this update view param logical quota based on the context it is used -func (m *UpdateViewParamLogicalQuota) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with QuotaPolicy - if err := m.QuotaPolicy.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *UpdateViewParamLogicalQuota) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UpdateViewParamLogicalQuota) UnmarshalBinary(b []byte) error { - var res UpdateViewParamLogicalQuota - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/upload_package_result.go b/v1/models/upload_package_result.go deleted file mode 100644 index 225620d1..00000000 --- a/v1/models/upload_package_result.go +++ /dev/null @@ -1,53 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// UploadPackageResult Upload Package Result. -// -// Specifies the result of a request to upload a package to a Cluster. -// -// swagger:model UploadPackageResult -type UploadPackageResult struct { - - // Specifies a message describing the result of the request to upload - // a package to a Cluster. - Message *string `json:"message,omitempty"` -} - -// Validate validates this upload package result -func (m *UploadPackageResult) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this upload package result based on context it is used -func (m *UploadPackageResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *UploadPackageResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *UploadPackageResult) UnmarshalBinary(b []byte) error { - var res UploadPackageResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/v_mware_rx_cluster_capability.go b/v1/models/v_mware_rx_cluster_capability.go new file mode 100644 index 00000000..d4193098 --- /dev/null +++ b/v1/models/v_mware_rx_cluster_capability.go @@ -0,0 +1,51 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// VMwareRxClusterCapability v mware rx cluster capability +// +// swagger:model VMwareRxClusterCapability +type VMwareRxClusterCapability struct { + + // Indicate whether the VMware multi NIC network mapping is supported on Rx + // cluster. + IsMultiNicNetworkMappingSupported *bool `json:"isMultiNicNetworkMappingSupported,omitempty"` +} + +// Validate validates this v mware rx cluster capability +func (m *VMwareRxClusterCapability) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v mware rx cluster capability based on context it is used +func (m *VMwareRxClusterCapability) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *VMwareRxClusterCapability) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *VMwareRxClusterCapability) UnmarshalBinary(b []byte) error { + var res VMwareRxClusterCapability + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/v1/models/vault_encryption_key.go b/v1/models/vault_encryption_key.go index 92a4de29..10edc5fc 100644 --- a/v1/models/vault_encryption_key.go +++ b/v1/models/vault_encryption_key.go @@ -29,8 +29,12 @@ type VaultEncryptionKey struct { // Encrypted Data Encryption Key (eDEK). EncryptionKeyData *string `json:"encryptionKeyData,omitempty"` - // key Uid - KeyUID *VaultEncryptionKeyKeyUID `json:"keyUid,omitempty"` + // Universal Id. + // + // Specifies the universal id of the Data Encryption Key. + KeyUID struct { + UniversalID + } `json:"keyUid,omitempty"` // Specifies the id of the Vault whose data is encrypted by // this key. @@ -59,17 +63,6 @@ func (m *VaultEncryptionKey) validateKeyUID(formats strfmt.Registry) error { return nil } - if m.KeyUID != nil { - if err := m.KeyUID.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("keyUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("keyUid") - } - return err - } - } - return nil } @@ -89,22 +82,6 @@ func (m *VaultEncryptionKey) ContextValidate(ctx context.Context, formats strfmt func (m *VaultEncryptionKey) contextValidateKeyUID(ctx context.Context, formats strfmt.Registry) error { - if m.KeyUID != nil { - - if swag.IsZero(m.KeyUID) { // not required - return nil - } - - if err := m.KeyUID.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("keyUid") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("keyUid") - } - return err - } - } - return nil } diff --git a/v1/models/vault_encryption_key_key_uid.go b/v1/models/vault_encryption_key_key_uid.go deleted file mode 100644 index ae6df696..00000000 --- a/v1/models/vault_encryption_key_key_uid.go +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// VaultEncryptionKeyKeyUID Universal Id. -// -// Specifies the universal id of the Data Encryption Key. -// -// swagger:model vaultEncryptionKeyKeyUid -type VaultEncryptionKeyKeyUID struct { - UniversalID -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *VaultEncryptionKeyKeyUID) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 UniversalID - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.UniversalID = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m VaultEncryptionKeyKeyUID) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.UniversalID) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this vault encryption key key Uid -func (m *VaultEncryptionKeyKeyUID) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UniversalID - if err := m.UniversalID.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this vault encryption key key Uid based on the context it is used -func (m *VaultEncryptionKeyKeyUID) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UniversalID - if err := m.UniversalID.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *VaultEncryptionKeyKeyUID) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VaultEncryptionKeyKeyUID) UnmarshalBinary(b []byte) error { - var res VaultEncryptionKeyKeyUID - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/version_info.go b/v1/models/version_info.go new file mode 100644 index 00000000..50e831a6 --- /dev/null +++ b/v1/models/version_info.go @@ -0,0 +1,58 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// VersionInfo Specifies the Id containing the unique identifer and version +// +// swagger:model VersionInfo +type VersionInfo struct { + + // Unique identifier for the string entity. + // This field is used to uniquely distinguish different + // entities within the system. + ID *string `json:"id,omitempty"` + + // Version number associated with the string id. + // This can be used to track different versions of the entity + // id over time. The string ID assigned to the an entity may + // change (infrequently) across software versions. + Version *int64 `json:"version,omitempty"` +} + +// Validate validates this version info +func (m *VersionInfo) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this version info based on context it is used +func (m *VersionInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *VersionInfo) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *VersionInfo) UnmarshalBinary(b []byte) error { + var res VersionInfo + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/v1/models/view.go b/v1/models/view.go index d035bce4..79653d44 100644 --- a/v1/models/view.go +++ b/v1/models/view.go @@ -138,8 +138,24 @@ type View struct { // Specifies if a view contains migrated data. IsTargetForMigratedData *bool `json:"isTargetForMigratedData,omitempty"` - // logical quota - LogicalQuota *ViewLogicalQuota `json:"logicalQuota,omitempty"` + // Specifies an optional logical quota limit (in bytes) for the usage allowed + // on this View. + // (Logical data is when the data is fully hydrated and expanded.) + // This limit overrides the limit inherited from the Storage Domain + // (View Box) (if set). + // If logicalQuota is nil, the limit is inherited from the + // Storage Domain (View Box) (if set). + // A new write is not allowed if the Storage Domain (View Box) will exceed the + // specified quota. + // However, it takes time for the Cohesity Cluster to calculate + // the usage across Nodes, so the limit may be exceeded by a small amount. + // In addition, if the limit is increased or data is removed, + // there may be a delay before the Cohesity Cluster allows more data + // to be written to the View, as the Cluster is calculating the usage + // across Nodes. + LogicalQuota struct { + QuotaPolicy + } `json:"logicalQuota,omitempty"` // LogicalUsageBytes is the logical usage in bytes for the view. LogicalUsageBytes *int64 `json:"logicalUsageBytes,omitempty"` @@ -177,7 +193,7 @@ type View struct { // Specifies the Sid of the view owner. OwnerSid *string `json:"ownerSid,omitempty"` - // Specifies the supported Protocols for the View. + // Deprecated: Specifies the supported Protocols for the View. // 'kAll' enables protocol access to following three views: NFS, SMB and S3. // 'kNFSOnly' enables protocol access to NFS only. // 'kSMBOnly' enables protocol access to SMB only. @@ -274,6 +290,9 @@ type View struct { // Specifies information about the Protection Jobs protecting this View. ViewProtection *ViewProtection `json:"viewProtection,omitempty"` + + // Specifies the supported Protocols for the View. + ViewProtocol []*ViewProtocol `json:"viewProtocol"` } // Validate validates this view @@ -364,6 +383,10 @@ func (m *View) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateViewProtocol(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -477,17 +500,6 @@ func (m *View) validateLogicalQuota(formats strfmt.Registry) error { return nil } - if m.LogicalQuota != nil { - if err := m.LogicalQuota.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("logicalQuota") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("logicalQuota") - } - return err - } - } - return nil } @@ -890,6 +902,32 @@ func (m *View) validateViewProtection(formats strfmt.Registry) error { return nil } +func (m *View) validateViewProtocol(formats strfmt.Registry) error { + if swag.IsZero(m.ViewProtocol) { // not required + return nil + } + + for i := 0; i < len(m.ViewProtocol); i++ { + if swag.IsZero(m.ViewProtocol[i]) { // not required + continue + } + + if m.ViewProtocol[i] != nil { + if err := m.ViewProtocol[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("viewProtocol" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("viewProtocol" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + // ContextValidate validate this view based on the context it is used func (m *View) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error @@ -966,6 +1004,10 @@ func (m *View) ContextValidate(ctx context.Context, formats strfmt.Registry) err res = append(res, err) } + if err := m.contextValidateViewProtocol(ctx, formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -1083,22 +1125,6 @@ func (m *View) contextValidateIntent(ctx context.Context, formats strfmt.Registr func (m *View) contextValidateLogicalQuota(ctx context.Context, formats strfmt.Registry) error { - if m.LogicalQuota != nil { - - if swag.IsZero(m.LogicalQuota) { // not required - return nil - } - - if err := m.LogicalQuota.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("logicalQuota") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("logicalQuota") - } - return err - } - } - return nil } @@ -1366,6 +1392,31 @@ func (m *View) contextValidateViewProtection(ctx context.Context, formats strfmt return nil } +func (m *View) contextValidateViewProtocol(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.ViewProtocol); i++ { + + if m.ViewProtocol[i] != nil { + + if swag.IsZero(m.ViewProtocol[i]) { // not required + return nil + } + + if err := m.ViewProtocol[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("viewProtocol" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("viewProtocol" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + // MarshalBinary interface implementation func (m *View) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/v1/models/view_box.go b/v1/models/view_box.go index 6b707022..30d4a8c8 100644 --- a/v1/models/view_box.go +++ b/v1/models/view_box.go @@ -58,11 +58,27 @@ type ViewBox struct { // Read Only: true ClusterPartitionName *string `json:"clusterPartitionName,omitempty"` - // default user quota policy - DefaultUserQuotaPolicy *ViewBoxDefaultUserQuotaPolicy `json:"defaultUserQuotaPolicy,omitempty"` - - // default view quota policy - DefaultViewQuotaPolicy *ViewBoxDefaultViewQuotaPolicy `json:"defaultViewQuotaPolicy,omitempty"` + // Specifies an optional quota policy/limits that are inherited by all users + // within the views in this viewbox. + DefaultUserQuotaPolicy struct { + QuotaPolicy + } `json:"defaultUserQuotaPolicy,omitempty"` + + // Specifies an optional default logical quota limit (in bytes) + // for the Views in this Storage Domain (View Box). + // (Logical data is when the data is fully hydrated and expanded.) + // However, this inherited quota can be overwritten at the View level. + // A new write is not allowed if the Storage Domain (View Box) will exceed + // the specified quota. + // However, it takes time for the Cohesity Cluster to calculate + // the usage across Nodes, so the limit may be exceeded by a small amount. + // In addition, if the limit is increased or data is removed, + // there may be delay before the Cohesity Cluster allows more data + // to be written to the Storage Domain (View Box), as the Cluster is + // calculating the usage across Nodes. + DefaultViewQuotaPolicy struct { + QuotaPolicy + } `json:"defaultViewQuotaPolicy,omitempty"` // Specifies whether DEK(Data Encryption Key) rotation is enabled for this // viewbox. This is applicable only when the viewbox uses AWS or similar KMS @@ -112,8 +128,24 @@ type ViewBox struct { // Specifies the NIS domain that this view box is mapped to. NisDomainNameVec []string `json:"nisDomainNameVec"` - // physical quota - PhysicalQuota *ViewBoxPhysicalQuota `json:"physicalQuota,omitempty"` + // Specifies an optional quota limit (in bytes) for the physical + // usage of this Storage Domain (View Box). + // This quota limit defines a physical limit for size of the data that + // can be physically stored on the Storage Domain (View Box), after the data + // has been reduced by change block tracking, compression and deduplication. + // The physical usage is the aggregate sum of the data stored for this + // Storage Domain (View Box) on all disks in the Cluster. + // (The usage includes Cloud Tier data and user data.) + // A new write is not allowed if the Storage Domain (View Box) will exceed + // the specified quota. However, it takes time for the Cohesity Cluster to + // calculate the usage across Nodes, so the limit may be exceeded by a small + // amount. In addition, if the limit is increased or data is removed, + // there may be a delay before the Cohesity Cluster allows more data + // to be written to the Storage Domain (View Box), as the Cluster is + // calculating the usage across Nodes. + PhysicalQuota struct { + QuotaPolicy + } `json:"physicalQuota,omitempty"` // Specifies the current removal state of the Storage Domain (View Box). // 'kDontRemove' means the state of object is functional and @@ -258,17 +290,6 @@ func (m *ViewBox) validateDefaultUserQuotaPolicy(formats strfmt.Registry) error return nil } - if m.DefaultUserQuotaPolicy != nil { - if err := m.DefaultUserQuotaPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("defaultUserQuotaPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("defaultUserQuotaPolicy") - } - return err - } - } - return nil } @@ -277,17 +298,6 @@ func (m *ViewBox) validateDefaultViewQuotaPolicy(formats strfmt.Registry) error return nil } - if m.DefaultViewQuotaPolicy != nil { - if err := m.DefaultViewQuotaPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("defaultViewQuotaPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("defaultViewQuotaPolicy") - } - return err - } - } - return nil } @@ -305,17 +315,6 @@ func (m *ViewBox) validatePhysicalQuota(formats strfmt.Registry) error { return nil } - if m.PhysicalQuota != nil { - if err := m.PhysicalQuota.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("physicalQuota") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("physicalQuota") - } - return err - } - } - return nil } @@ -506,64 +505,16 @@ func (m *ViewBox) contextValidateClusterPartitionName(ctx context.Context, forma func (m *ViewBox) contextValidateDefaultUserQuotaPolicy(ctx context.Context, formats strfmt.Registry) error { - if m.DefaultUserQuotaPolicy != nil { - - if swag.IsZero(m.DefaultUserQuotaPolicy) { // not required - return nil - } - - if err := m.DefaultUserQuotaPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("defaultUserQuotaPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("defaultUserQuotaPolicy") - } - return err - } - } - return nil } func (m *ViewBox) contextValidateDefaultViewQuotaPolicy(ctx context.Context, formats strfmt.Registry) error { - if m.DefaultViewQuotaPolicy != nil { - - if swag.IsZero(m.DefaultViewQuotaPolicy) { // not required - return nil - } - - if err := m.DefaultViewQuotaPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("defaultViewQuotaPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("defaultViewQuotaPolicy") - } - return err - } - } - return nil } func (m *ViewBox) contextValidatePhysicalQuota(ctx context.Context, formats strfmt.Registry) error { - if m.PhysicalQuota != nil { - - if swag.IsZero(m.PhysicalQuota) { // not required - return nil - } - - if err := m.PhysicalQuota.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("physicalQuota") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("physicalQuota") - } - return err - } - } - return nil } diff --git a/v1/models/view_box_default_user_quota_policy.go b/v1/models/view_box_default_user_quota_policy.go deleted file mode 100644 index 4aaf8654..00000000 --- a/v1/models/view_box_default_user_quota_policy.go +++ /dev/null @@ -1,94 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ViewBoxDefaultUserQuotaPolicy Specifies an optional quota policy/limits that are inherited by all users -// within the views in this viewbox. -// -// swagger:model viewBoxDefaultUserQuotaPolicy -type ViewBoxDefaultUserQuotaPolicy struct { - QuotaPolicy -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ViewBoxDefaultUserQuotaPolicy) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 QuotaPolicy - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.QuotaPolicy = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ViewBoxDefaultUserQuotaPolicy) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.QuotaPolicy) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this view box default user quota policy -func (m *ViewBoxDefaultUserQuotaPolicy) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with QuotaPolicy - if err := m.QuotaPolicy.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this view box default user quota policy based on the context it is used -func (m *ViewBoxDefaultUserQuotaPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with QuotaPolicy - if err := m.QuotaPolicy.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ViewBoxDefaultUserQuotaPolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ViewBoxDefaultUserQuotaPolicy) UnmarshalBinary(b []byte) error { - var res ViewBoxDefaultUserQuotaPolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/view_box_default_view_quota_policy.go b/v1/models/view_box_default_view_quota_policy.go deleted file mode 100644 index c66117f5..00000000 --- a/v1/models/view_box_default_view_quota_policy.go +++ /dev/null @@ -1,104 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ViewBoxDefaultViewQuotaPolicy Specifies an optional default logical quota limit (in bytes) -// for the Views in this Storage Domain (View Box). -// (Logical data is when the data is fully hydrated and expanded.) -// However, this inherited quota can be overwritten at the View level. -// A new write is not allowed if the Storage Domain (View Box) will exceed -// the specified quota. -// However, it takes time for the Cohesity Cluster to calculate -// the usage across Nodes, so the limit may be exceeded by a small amount. -// In addition, if the limit is increased or data is removed, -// there may be delay before the Cohesity Cluster allows more data -// to be written to the Storage Domain (View Box), as the Cluster is -// calculating the usage across Nodes. -// -// swagger:model viewBoxDefaultViewQuotaPolicy -type ViewBoxDefaultViewQuotaPolicy struct { - QuotaPolicy -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ViewBoxDefaultViewQuotaPolicy) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 QuotaPolicy - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.QuotaPolicy = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ViewBoxDefaultViewQuotaPolicy) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.QuotaPolicy) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this view box default view quota policy -func (m *ViewBoxDefaultViewQuotaPolicy) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with QuotaPolicy - if err := m.QuotaPolicy.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this view box default view quota policy based on the context it is used -func (m *ViewBoxDefaultViewQuotaPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with QuotaPolicy - if err := m.QuotaPolicy.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ViewBoxDefaultViewQuotaPolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ViewBoxDefaultViewQuotaPolicy) UnmarshalBinary(b []byte) error { - var res ViewBoxDefaultViewQuotaPolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/view_box_physical_quota.go b/v1/models/view_box_physical_quota.go deleted file mode 100644 index 72844c24..00000000 --- a/v1/models/view_box_physical_quota.go +++ /dev/null @@ -1,107 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ViewBoxPhysicalQuota Specifies an optional quota limit (in bytes) for the physical -// usage of this Storage Domain (View Box). -// This quota limit defines a physical limit for size of the data that -// can be physically stored on the Storage Domain (View Box), after the data -// has been reduced by change block tracking, compression and deduplication. -// The physical usage is the aggregate sum of the data stored for this -// Storage Domain (View Box) on all disks in the Cluster. -// (The usage includes Cloud Tier data and user data.) -// A new write is not allowed if the Storage Domain (View Box) will exceed -// the specified quota. However, it takes time for the Cohesity Cluster to -// calculate the usage across Nodes, so the limit may be exceeded by a small -// amount. In addition, if the limit is increased or data is removed, -// there may be a delay before the Cohesity Cluster allows more data -// to be written to the Storage Domain (View Box), as the Cluster is -// calculating the usage across Nodes. -// -// swagger:model viewBoxPhysicalQuota -type ViewBoxPhysicalQuota struct { - QuotaPolicy -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ViewBoxPhysicalQuota) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 QuotaPolicy - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.QuotaPolicy = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ViewBoxPhysicalQuota) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.QuotaPolicy) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this view box physical quota -func (m *ViewBoxPhysicalQuota) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with QuotaPolicy - if err := m.QuotaPolicy.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this view box physical quota based on the context it is used -func (m *ViewBoxPhysicalQuota) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with QuotaPolicy - if err := m.QuotaPolicy.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ViewBoxPhysicalQuota) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ViewBoxPhysicalQuota) UnmarshalBinary(b []byte) error { - var res ViewBoxPhysicalQuota - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/view_logical_quota.go b/v1/models/view_logical_quota.go deleted file mode 100644 index 88b1bfa8..00000000 --- a/v1/models/view_logical_quota.go +++ /dev/null @@ -1,107 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ViewLogicalQuota Specifies an optional logical quota limit (in bytes) for the usage allowed -// on this View. -// (Logical data is when the data is fully hydrated and expanded.) -// This limit overrides the limit inherited from the Storage Domain -// (View Box) (if set). -// If logicalQuota is nil, the limit is inherited from the -// Storage Domain (View Box) (if set). -// A new write is not allowed if the Storage Domain (View Box) will exceed the -// specified quota. -// However, it takes time for the Cohesity Cluster to calculate -// the usage across Nodes, so the limit may be exceeded by a small amount. -// In addition, if the limit is increased or data is removed, -// there may be a delay before the Cohesity Cluster allows more data -// to be written to the View, as the Cluster is calculating the usage -// across Nodes. -// -// swagger:model viewLogicalQuota -type ViewLogicalQuota struct { - QuotaPolicy -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ViewLogicalQuota) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 QuotaPolicy - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.QuotaPolicy = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ViewLogicalQuota) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.QuotaPolicy) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this view logical quota -func (m *ViewLogicalQuota) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with QuotaPolicy - if err := m.QuotaPolicy.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this view logical quota based on the context it is used -func (m *ViewLogicalQuota) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with QuotaPolicy - if err := m.QuotaPolicy.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ViewLogicalQuota) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ViewLogicalQuota) UnmarshalBinary(b []byte) error { - var res ViewLogicalQuota - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/view_protection_source.go b/v1/models/view_protection_source.go index 375e93c2..23e338e3 100644 --- a/v1/models/view_protection_source.go +++ b/v1/models/view_protection_source.go @@ -22,8 +22,11 @@ import ( // swagger:model ViewProtectionSource type ViewProtectionSource struct { - // id - ID *ViewProtectionSourceID `json:"id,omitempty"` + // Specifies a unique id of a Protection Source for a View. + // The id is unique across Cohesity Clusters. + ID struct { + UniversalID + } `json:"id,omitempty"` // Specifies a human readable name of the Protection Source of a View. Name *string `json:"name,omitempty"` @@ -60,17 +63,6 @@ func (m *ViewProtectionSource) validateID(formats strfmt.Registry) error { return nil } - if m.ID != nil { - if err := m.ID.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("id") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("id") - } - return err - } - } - return nil } @@ -132,22 +124,6 @@ func (m *ViewProtectionSource) ContextValidate(ctx context.Context, formats strf func (m *ViewProtectionSource) contextValidateID(ctx context.Context, formats strfmt.Registry) error { - if m.ID != nil { - - if swag.IsZero(m.ID) { // not required - return nil - } - - if err := m.ID.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("id") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("id") - } - return err - } - } - return nil } diff --git a/v1/models/view_protection_source_id.go b/v1/models/view_protection_source_id.go deleted file mode 100644 index f49da85f..00000000 --- a/v1/models/view_protection_source_id.go +++ /dev/null @@ -1,94 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ViewProtectionSourceID Specifies a unique id of a Protection Source for a View. -// The id is unique across Cohesity Clusters. -// -// swagger:model viewProtectionSourceId -type ViewProtectionSourceID struct { - UniversalID -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *ViewProtectionSourceID) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 UniversalID - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.UniversalID = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m ViewProtectionSourceID) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.UniversalID) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this view protection source Id -func (m *ViewProtectionSourceID) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UniversalID - if err := m.UniversalID.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this view protection source Id based on the context it is used -func (m *ViewProtectionSourceID) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with UniversalID - if err := m.UniversalID.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *ViewProtectionSourceID) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ViewProtectionSourceID) UnmarshalBinary(b []byte) error { - var res ViewProtectionSourceID - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/view_protocol.go b/v1/models/view_protocol.go new file mode 100644 index 00000000..4b8c8038 --- /dev/null +++ b/v1/models/view_protocol.go @@ -0,0 +1,63 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// ViewProtocol view protocol +// +// swagger:model ViewProtocol +type ViewProtocol struct { + + // Mode of protocol access. + // 'ReadOnly' + // 'ReadWrite' + // Enum: [ReadOnly ReadWrite] + Mode *string `json:"mode,omitempty"` + + // Type of protocol. + // Specifies the supported Protocols for the View. + // 'NFS' enables protocol access to NFS v3. + // 'NFS4' enables protocol access to NFS v4.1. + // 'SMB' enables protocol access to SMB. + // 'S3' enables protocol access to S3. + // 'Swift' enables protocol access to Swift. + // Enum: [NFS NFS4 SMB S3 Swift] + Type *string `json:"type,omitempty"` +} + +// Validate validates this view protocol +func (m *ViewProtocol) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this view protocol based on context it is used +func (m *ViewProtocol) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *ViewProtocol) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ViewProtocol) UnmarshalBinary(b []byte) error { + var res ViewProtocol + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/v1/models/vlan.go b/v1/models/vlan.go index f73ee2a0..ae8e163d 100644 --- a/v1/models/vlan.go +++ b/v1/models/vlan.go @@ -99,11 +99,26 @@ type Vlan struct { // mtu Mtu *int32 `json:"mtu,omitempty"` - // subnet - Subnet *VlanSubnet `json:"subnet,omitempty"` - - // subnet v6 - SubnetV6 *VlanSubnetV6 `json:"subnetV6,omitempty"` + // Subnet. + // + // Specifies the subnet of the VLAN. + // The netmask can be specified by setting netmaskBits or netmaskIp4. + // The netmask can only be set using netmaskIp4 if the IP address is + // an IPv4 address. It can carry V4 or V6 in case of requests, and carries + // V4 in case of response. + Subnet struct { + Subnet + } `json:"subnet,omitempty"` + + // Subnet. + // + // Specifies the subnet of the VLAN. + // The netmask can be specified by setting netmaskBits or netmaskIp4. + // The netmask can only be set using netmaskIp4 if the IP address is + // an IPv4 address. + SubnetV6 struct { + Subnet + } `json:"subnetV6,omitempty"` // Optional tenant id that this vlan belongs to. TenantID *string `json:"tenantId,omitempty"` @@ -218,17 +233,6 @@ func (m *Vlan) validateSubnet(formats strfmt.Registry) error { return nil } - if m.Subnet != nil { - if err := m.Subnet.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("subnet") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("subnet") - } - return err - } - } - return nil } @@ -237,17 +241,6 @@ func (m *Vlan) validateSubnetV6(formats strfmt.Registry) error { return nil } - if m.SubnetV6 != nil { - if err := m.SubnetV6.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("subnetV6") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("subnetV6") - } - return err - } - } - return nil } @@ -354,43 +347,11 @@ func (m *Vlan) contextValidateIPRanges(ctx context.Context, formats strfmt.Regis func (m *Vlan) contextValidateSubnet(ctx context.Context, formats strfmt.Registry) error { - if m.Subnet != nil { - - if swag.IsZero(m.Subnet) { // not required - return nil - } - - if err := m.Subnet.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("subnet") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("subnet") - } - return err - } - } - return nil } func (m *Vlan) contextValidateSubnetV6(ctx context.Context, formats strfmt.Registry) error { - if m.SubnetV6 != nil { - - if swag.IsZero(m.SubnetV6) { // not required - return nil - } - - if err := m.SubnetV6.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("subnetV6") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("subnetV6") - } - return err - } - } - return nil } diff --git a/v1/models/vlan_subnet.go b/v1/models/vlan_subnet.go deleted file mode 100644 index 2eec5f3f..00000000 --- a/v1/models/vlan_subnet.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// VlanSubnet Subnet. -// -// Specifies the subnet of the VLAN. -// The netmask can be specified by setting netmaskBits or netmaskIp4. -// The netmask can only be set using netmaskIp4 if the IP address is -// an IPv4 address. It can carry V4 or V6 in case of requests, and carries -// V4 in case of response. -// -// swagger:model vlanSubnet -type VlanSubnet struct { - Subnet -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *VlanSubnet) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 Subnet - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.Subnet = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m VlanSubnet) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.Subnet) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this vlan subnet -func (m *VlanSubnet) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with Subnet - if err := m.Subnet.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this vlan subnet based on the context it is used -func (m *VlanSubnet) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with Subnet - if err := m.Subnet.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *VlanSubnet) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VlanSubnet) UnmarshalBinary(b []byte) error { - var res VlanSubnet - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/vlan_subnet_v6.go b/v1/models/vlan_subnet_v6.go deleted file mode 100644 index dd7735cc..00000000 --- a/v1/models/vlan_subnet_v6.go +++ /dev/null @@ -1,98 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// VlanSubnetV6 Subnet. -// -// Specifies the subnet of the VLAN. -// The netmask can be specified by setting netmaskBits or netmaskIp4. -// The netmask can only be set using netmaskIp4 if the IP address is -// an IPv4 address. -// -// swagger:model vlanSubnetV6 -type VlanSubnetV6 struct { - Subnet -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *VlanSubnetV6) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 Subnet - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.Subnet = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m VlanSubnetV6) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.Subnet) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this vlan subnet v6 -func (m *VlanSubnetV6) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with Subnet - if err := m.Subnet.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this vlan subnet v6 based on the context it is used -func (m *VlanSubnetV6) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with Subnet - if err := m.Subnet.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *VlanSubnetV6) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VlanSubnetV6) UnmarshalBinary(b []byte) error { - var res VlanSubnetV6 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v1/models/vmware_special_parameters.go b/v1/models/vmware_special_parameters.go index eb4255ec..59341b4f 100644 --- a/v1/models/vmware_special_parameters.go +++ b/v1/models/vmware_special_parameters.go @@ -30,8 +30,17 @@ type VmwareSpecialParameters struct { // are excluded from all Protection Sources in the Protection Job. ExcludedDisks []*DiskUnit `json:"excludedDisks"` - // vm credentials - VMCredentials *VmwareSpecialParametersVMCredentials `json:"vmCredentials,omitempty"` + // VM Credentials. + // + // Specifies the administrator credentials to log in to the + // guest Windows system of a VM that hosts the Microsoft Exchange Server. + // If truncateExchangeLog is set to true and the specified source + // is a VM, administrator credentials to log in to the guest Windows system + // of the VM must be provided to truncate the logs. + // This field is only applicable to Sources in the kVMware environment. + VMCredentials struct { + Credentials + } `json:"vmCredentials,omitempty"` } // Validate validates this vmware special parameters @@ -106,17 +115,6 @@ func (m *VmwareSpecialParameters) validateVMCredentials(formats strfmt.Registry) return nil } - if m.VMCredentials != nil { - if err := m.VMCredentials.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmCredentials") - } - return err - } - } - return nil } @@ -190,22 +188,6 @@ func (m *VmwareSpecialParameters) contextValidateExcludedDisks(ctx context.Conte func (m *VmwareSpecialParameters) contextValidateVMCredentials(ctx context.Context, formats strfmt.Registry) error { - if m.VMCredentials != nil { - - if swag.IsZero(m.VMCredentials) { // not required - return nil - } - - if err := m.VMCredentials.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("vmCredentials") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("vmCredentials") - } - return err - } - } - return nil } diff --git a/v1/models/vmware_special_parameters_vm_credentials.go b/v1/models/vmware_special_parameters_vm_credentials.go deleted file mode 100644 index edfe4930..00000000 --- a/v1/models/vmware_special_parameters_vm_credentials.go +++ /dev/null @@ -1,100 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// VmwareSpecialParametersVMCredentials VM Credentials. -// -// Specifies the administrator credentials to log in to the -// guest Windows system of a VM that hosts the Microsoft Exchange Server. -// If truncateExchangeLog is set to true and the specified source -// is a VM, administrator credentials to log in to the guest Windows system -// of the VM must be provided to truncate the logs. -// This field is only applicable to Sources in the kVMware environment. -// -// swagger:model vmwareSpecialParametersVmCredentials -type VmwareSpecialParametersVMCredentials struct { - Credentials -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *VmwareSpecialParametersVMCredentials) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 Credentials - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.Credentials = aO0 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m VmwareSpecialParametersVMCredentials) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.Credentials) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this vmware special parameters Vm credentials -func (m *VmwareSpecialParametersVMCredentials) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with Credentials - if err := m.Credentials.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this vmware special parameters Vm credentials based on the context it is used -func (m *VmwareSpecialParametersVMCredentials) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with Credentials - if err := m.Credentials.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *VmwareSpecialParametersVMCredentials) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VmwareSpecialParametersVMCredentials) UnmarshalBinary(b []byte) error { - var res VmwareSpecialParametersVMCredentials - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/v2/client/platform/delete_cluster_snapshot_policy_parameters.go b/v2/client/platform/delete_cluster_snapshot_policy_parameters.go new file mode 100644 index 00000000..deaa39f1 --- /dev/null +++ b/v2/client/platform/delete_cluster_snapshot_policy_parameters.go @@ -0,0 +1,128 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package platform + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewDeleteClusterSnapshotPolicyParams creates a new DeleteClusterSnapshotPolicyParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDeleteClusterSnapshotPolicyParams() *DeleteClusterSnapshotPolicyParams { + return &DeleteClusterSnapshotPolicyParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewDeleteClusterSnapshotPolicyParamsWithTimeout creates a new DeleteClusterSnapshotPolicyParams object +// with the ability to set a timeout on a request. +func NewDeleteClusterSnapshotPolicyParamsWithTimeout(timeout time.Duration) *DeleteClusterSnapshotPolicyParams { + return &DeleteClusterSnapshotPolicyParams{ + timeout: timeout, + } +} + +// NewDeleteClusterSnapshotPolicyParamsWithContext creates a new DeleteClusterSnapshotPolicyParams object +// with the ability to set a context for a request. +func NewDeleteClusterSnapshotPolicyParamsWithContext(ctx context.Context) *DeleteClusterSnapshotPolicyParams { + return &DeleteClusterSnapshotPolicyParams{ + Context: ctx, + } +} + +// NewDeleteClusterSnapshotPolicyParamsWithHTTPClient creates a new DeleteClusterSnapshotPolicyParams object +// with the ability to set a custom HTTPClient for a request. +func NewDeleteClusterSnapshotPolicyParamsWithHTTPClient(client *http.Client) *DeleteClusterSnapshotPolicyParams { + return &DeleteClusterSnapshotPolicyParams{ + HTTPClient: client, + } +} + +/* +DeleteClusterSnapshotPolicyParams contains all the parameters to send to the API endpoint + + for the delete cluster snapshot policy operation. + + Typically these are written to a http.Request. +*/ +type DeleteClusterSnapshotPolicyParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the delete cluster snapshot policy params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DeleteClusterSnapshotPolicyParams) WithDefaults() *DeleteClusterSnapshotPolicyParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the delete cluster snapshot policy params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DeleteClusterSnapshotPolicyParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the delete cluster snapshot policy params +func (o *DeleteClusterSnapshotPolicyParams) WithTimeout(timeout time.Duration) *DeleteClusterSnapshotPolicyParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the delete cluster snapshot policy params +func (o *DeleteClusterSnapshotPolicyParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the delete cluster snapshot policy params +func (o *DeleteClusterSnapshotPolicyParams) WithContext(ctx context.Context) *DeleteClusterSnapshotPolicyParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the delete cluster snapshot policy params +func (o *DeleteClusterSnapshotPolicyParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the delete cluster snapshot policy params +func (o *DeleteClusterSnapshotPolicyParams) WithHTTPClient(client *http.Client) *DeleteClusterSnapshotPolicyParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the delete cluster snapshot policy params +func (o *DeleteClusterSnapshotPolicyParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *DeleteClusterSnapshotPolicyParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/v2/client/platform/delete_cluster_snapshot_policy_responses.go b/v2/client/platform/delete_cluster_snapshot_policy_responses.go new file mode 100644 index 00000000..20ecbeff --- /dev/null +++ b/v2/client/platform/delete_cluster_snapshot_policy_responses.go @@ -0,0 +1,173 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package platform + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/cohesity/go-sdk/v2/models" +) + +// DeleteClusterSnapshotPolicyReader is a Reader for the DeleteClusterSnapshotPolicy structure. +type DeleteClusterSnapshotPolicyReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DeleteClusterSnapshotPolicyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewDeleteClusterSnapshotPolicyNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewDeleteClusterSnapshotPolicyDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewDeleteClusterSnapshotPolicyNoContent creates a DeleteClusterSnapshotPolicyNoContent with default headers values +func NewDeleteClusterSnapshotPolicyNoContent() *DeleteClusterSnapshotPolicyNoContent { + return &DeleteClusterSnapshotPolicyNoContent{} +} + +/* +DeleteClusterSnapshotPolicyNoContent describes a response with status code 204, with default header values. + +No Content +*/ +type DeleteClusterSnapshotPolicyNoContent struct { +} + +// IsSuccess returns true when this delete cluster snapshot policy no content response has a 2xx status code +func (o *DeleteClusterSnapshotPolicyNoContent) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this delete cluster snapshot policy no content response has a 3xx status code +func (o *DeleteClusterSnapshotPolicyNoContent) IsRedirect() bool { + return false +} + +// IsClientError returns true when this delete cluster snapshot policy no content response has a 4xx status code +func (o *DeleteClusterSnapshotPolicyNoContent) IsClientError() bool { + return false +} + +// IsServerError returns true when this delete cluster snapshot policy no content response has a 5xx status code +func (o *DeleteClusterSnapshotPolicyNoContent) IsServerError() bool { + return false +} + +// IsCode returns true when this delete cluster snapshot policy no content response a status code equal to that given +func (o *DeleteClusterSnapshotPolicyNoContent) IsCode(code int) bool { + return code == 204 +} + +// Code gets the status code for the delete cluster snapshot policy no content response +func (o *DeleteClusterSnapshotPolicyNoContent) Code() int { + return 204 +} + +func (o *DeleteClusterSnapshotPolicyNoContent) Error() string { + return fmt.Sprintf("[DELETE /clusters/snapshot-policy][%d] deleteClusterSnapshotPolicyNoContent", 204) +} + +func (o *DeleteClusterSnapshotPolicyNoContent) String() string { + return fmt.Sprintf("[DELETE /clusters/snapshot-policy][%d] deleteClusterSnapshotPolicyNoContent", 204) +} + +func (o *DeleteClusterSnapshotPolicyNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewDeleteClusterSnapshotPolicyDefault creates a DeleteClusterSnapshotPolicyDefault with default headers values +func NewDeleteClusterSnapshotPolicyDefault(code int) *DeleteClusterSnapshotPolicyDefault { + return &DeleteClusterSnapshotPolicyDefault{ + _statusCode: code, + } +} + +/* +DeleteClusterSnapshotPolicyDefault describes a response with status code -1, with default header values. + +Error +*/ +type DeleteClusterSnapshotPolicyDefault struct { + _statusCode int + + Payload *models.Error +} + +// IsSuccess returns true when this delete cluster snapshot policy default response has a 2xx status code +func (o *DeleteClusterSnapshotPolicyDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this delete cluster snapshot policy default response has a 3xx status code +func (o *DeleteClusterSnapshotPolicyDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this delete cluster snapshot policy default response has a 4xx status code +func (o *DeleteClusterSnapshotPolicyDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this delete cluster snapshot policy default response has a 5xx status code +func (o *DeleteClusterSnapshotPolicyDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this delete cluster snapshot policy default response a status code equal to that given +func (o *DeleteClusterSnapshotPolicyDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the delete cluster snapshot policy default response +func (o *DeleteClusterSnapshotPolicyDefault) Code() int { + return o._statusCode +} + +func (o *DeleteClusterSnapshotPolicyDefault) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /clusters/snapshot-policy][%d] DeleteClusterSnapshotPolicy default %s", o._statusCode, payload) +} + +func (o *DeleteClusterSnapshotPolicyDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /clusters/snapshot-policy][%d] DeleteClusterSnapshotPolicy default %s", o._statusCode, payload) +} + +func (o *DeleteClusterSnapshotPolicyDefault) GetPayload() *models.Error { + return o.Payload +} + +func (o *DeleteClusterSnapshotPolicyDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/v2/client/platform/get_cluster_snapshot_policy_parameters.go b/v2/client/platform/get_cluster_snapshot_policy_parameters.go new file mode 100644 index 00000000..3277e1ad --- /dev/null +++ b/v2/client/platform/get_cluster_snapshot_policy_parameters.go @@ -0,0 +1,128 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package platform + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewGetClusterSnapshotPolicyParams creates a new GetClusterSnapshotPolicyParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewGetClusterSnapshotPolicyParams() *GetClusterSnapshotPolicyParams { + return &GetClusterSnapshotPolicyParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewGetClusterSnapshotPolicyParamsWithTimeout creates a new GetClusterSnapshotPolicyParams object +// with the ability to set a timeout on a request. +func NewGetClusterSnapshotPolicyParamsWithTimeout(timeout time.Duration) *GetClusterSnapshotPolicyParams { + return &GetClusterSnapshotPolicyParams{ + timeout: timeout, + } +} + +// NewGetClusterSnapshotPolicyParamsWithContext creates a new GetClusterSnapshotPolicyParams object +// with the ability to set a context for a request. +func NewGetClusterSnapshotPolicyParamsWithContext(ctx context.Context) *GetClusterSnapshotPolicyParams { + return &GetClusterSnapshotPolicyParams{ + Context: ctx, + } +} + +// NewGetClusterSnapshotPolicyParamsWithHTTPClient creates a new GetClusterSnapshotPolicyParams object +// with the ability to set a custom HTTPClient for a request. +func NewGetClusterSnapshotPolicyParamsWithHTTPClient(client *http.Client) *GetClusterSnapshotPolicyParams { + return &GetClusterSnapshotPolicyParams{ + HTTPClient: client, + } +} + +/* +GetClusterSnapshotPolicyParams contains all the parameters to send to the API endpoint + + for the get cluster snapshot policy operation. + + Typically these are written to a http.Request. +*/ +type GetClusterSnapshotPolicyParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the get cluster snapshot policy params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *GetClusterSnapshotPolicyParams) WithDefaults() *GetClusterSnapshotPolicyParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the get cluster snapshot policy params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *GetClusterSnapshotPolicyParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the get cluster snapshot policy params +func (o *GetClusterSnapshotPolicyParams) WithTimeout(timeout time.Duration) *GetClusterSnapshotPolicyParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get cluster snapshot policy params +func (o *GetClusterSnapshotPolicyParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get cluster snapshot policy params +func (o *GetClusterSnapshotPolicyParams) WithContext(ctx context.Context) *GetClusterSnapshotPolicyParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get cluster snapshot policy params +func (o *GetClusterSnapshotPolicyParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get cluster snapshot policy params +func (o *GetClusterSnapshotPolicyParams) WithHTTPClient(client *http.Client) *GetClusterSnapshotPolicyParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get cluster snapshot policy params +func (o *GetClusterSnapshotPolicyParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *GetClusterSnapshotPolicyParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/v2/client/platform/get_cluster_snapshot_policy_responses.go b/v2/client/platform/get_cluster_snapshot_policy_responses.go new file mode 100644 index 00000000..a46fe702 --- /dev/null +++ b/v2/client/platform/get_cluster_snapshot_policy_responses.go @@ -0,0 +1,187 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package platform + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/cohesity/go-sdk/v2/models" +) + +// GetClusterSnapshotPolicyReader is a Reader for the GetClusterSnapshotPolicy structure. +type GetClusterSnapshotPolicyReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetClusterSnapshotPolicyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetClusterSnapshotPolicyOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewGetClusterSnapshotPolicyDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewGetClusterSnapshotPolicyOK creates a GetClusterSnapshotPolicyOK with default headers values +func NewGetClusterSnapshotPolicyOK() *GetClusterSnapshotPolicyOK { + return &GetClusterSnapshotPolicyOK{} +} + +/* +GetClusterSnapshotPolicyOK describes a response with status code 200, with default header values. + +Success +*/ +type GetClusterSnapshotPolicyOK struct { + Payload *models.ClusterSnapshotPolicy +} + +// IsSuccess returns true when this get cluster snapshot policy o k response has a 2xx status code +func (o *GetClusterSnapshotPolicyOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this get cluster snapshot policy o k response has a 3xx status code +func (o *GetClusterSnapshotPolicyOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get cluster snapshot policy o k response has a 4xx status code +func (o *GetClusterSnapshotPolicyOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this get cluster snapshot policy o k response has a 5xx status code +func (o *GetClusterSnapshotPolicyOK) IsServerError() bool { + return false +} + +// IsCode returns true when this get cluster snapshot policy o k response a status code equal to that given +func (o *GetClusterSnapshotPolicyOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the get cluster snapshot policy o k response +func (o *GetClusterSnapshotPolicyOK) Code() int { + return 200 +} + +func (o *GetClusterSnapshotPolicyOK) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /clusters/snapshot-policy][%d] getClusterSnapshotPolicyOK %s", 200, payload) +} + +func (o *GetClusterSnapshotPolicyOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /clusters/snapshot-policy][%d] getClusterSnapshotPolicyOK %s", 200, payload) +} + +func (o *GetClusterSnapshotPolicyOK) GetPayload() *models.ClusterSnapshotPolicy { + return o.Payload +} + +func (o *GetClusterSnapshotPolicyOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ClusterSnapshotPolicy) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetClusterSnapshotPolicyDefault creates a GetClusterSnapshotPolicyDefault with default headers values +func NewGetClusterSnapshotPolicyDefault(code int) *GetClusterSnapshotPolicyDefault { + return &GetClusterSnapshotPolicyDefault{ + _statusCode: code, + } +} + +/* +GetClusterSnapshotPolicyDefault describes a response with status code -1, with default header values. + +Error +*/ +type GetClusterSnapshotPolicyDefault struct { + _statusCode int + + Payload *models.Error +} + +// IsSuccess returns true when this get cluster snapshot policy default response has a 2xx status code +func (o *GetClusterSnapshotPolicyDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this get cluster snapshot policy default response has a 3xx status code +func (o *GetClusterSnapshotPolicyDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this get cluster snapshot policy default response has a 4xx status code +func (o *GetClusterSnapshotPolicyDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this get cluster snapshot policy default response has a 5xx status code +func (o *GetClusterSnapshotPolicyDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this get cluster snapshot policy default response a status code equal to that given +func (o *GetClusterSnapshotPolicyDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the get cluster snapshot policy default response +func (o *GetClusterSnapshotPolicyDefault) Code() int { + return o._statusCode +} + +func (o *GetClusterSnapshotPolicyDefault) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /clusters/snapshot-policy][%d] GetClusterSnapshotPolicy default %s", o._statusCode, payload) +} + +func (o *GetClusterSnapshotPolicyDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /clusters/snapshot-policy][%d] GetClusterSnapshotPolicy default %s", o._statusCode, payload) +} + +func (o *GetClusterSnapshotPolicyDefault) GetPayload() *models.Error { + return o.Payload +} + +func (o *GetClusterSnapshotPolicyDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/v2/client/platform/platform_client.go b/v2/client/platform/platform_client.go index efb3c15c..568b3fac 100644 --- a/v2/client/platform/platform_client.go +++ b/v2/client/platform/platform_client.go @@ -96,6 +96,8 @@ type ClientService interface { DeleteClusterPackage(params *DeleteClusterPackageParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteClusterPackageAccepted, error) + DeleteClusterSnapshotPolicy(params *DeleteClusterSnapshotPolicyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteClusterSnapshotPolicyNoContent, error) + DeleteClusterVlan(params *DeleteClusterVlanParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteClusterVlanNoContent, error) DeleteHosts(params *DeleteHostsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteHostsNoContent, error) @@ -126,6 +128,8 @@ type ClientService interface { GetClusterPackages(params *GetClusterPackagesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetClusterPackagesOK, error) + GetClusterSnapshotPolicy(params *GetClusterSnapshotPolicyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetClusterSnapshotPolicyOK, error) + GetClusterState(params *GetClusterStateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetClusterStateOK, error) GetClusterVlans(params *GetClusterVlansParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetClusterVlansOK, error) @@ -188,6 +192,8 @@ type ClientService interface { UpdateCluster(params *UpdateClusterParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateClusterOK, error) + UpdateClusterSnapshotPolicy(params *UpdateClusterSnapshotPolicyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateClusterSnapshotPolicyOK, error) + UpdateClusterVlan(params *UpdateClusterVlanParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateClusterVlanOK, error) UpdateFeatureFlag(params *UpdateFeatureFlagParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateFeatureFlagOK, error) @@ -585,6 +591,46 @@ func (a *Client) DeleteClusterPackage(params *DeleteClusterPackageParams, authIn return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } +/* +DeleteClusterSnapshotPolicy deletes cluster snapshot policy + +Delete cluster snapshot policy. +*/ +func (a *Client) DeleteClusterSnapshotPolicy(params *DeleteClusterSnapshotPolicyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteClusterSnapshotPolicyNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDeleteClusterSnapshotPolicyParams() + } + op := &runtime.ClientOperation{ + ID: "DeleteClusterSnapshotPolicy", + Method: "DELETE", + PathPattern: "/clusters/snapshot-policy", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &DeleteClusterSnapshotPolicyReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DeleteClusterSnapshotPolicyNoContent) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*DeleteClusterSnapshotPolicyDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + /* DeleteClusterVlan deletes vlan @@ -1185,6 +1231,46 @@ func (a *Client) GetClusterPackages(params *GetClusterPackagesParams, authInfo r return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } +/* +GetClusterSnapshotPolicy gets cluster snapshot policy + +Get cluster snapshot policy. +*/ +func (a *Client) GetClusterSnapshotPolicy(params *GetClusterSnapshotPolicyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetClusterSnapshotPolicyOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetClusterSnapshotPolicyParams() + } + op := &runtime.ClientOperation{ + ID: "GetClusterSnapshotPolicy", + Method: "GET", + PathPattern: "/clusters/snapshot-policy", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &GetClusterSnapshotPolicyReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*GetClusterSnapshotPolicyOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*GetClusterSnapshotPolicyDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + /* GetClusterState gets cluster state @@ -2425,6 +2511,46 @@ func (a *Client) UpdateCluster(params *UpdateClusterParams, authInfo runtime.Cli return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } +/* +UpdateClusterSnapshotPolicy updates cluster snapshot policy + +Update cluster snapshot policy. +*/ +func (a *Client) UpdateClusterSnapshotPolicy(params *UpdateClusterSnapshotPolicyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateClusterSnapshotPolicyOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewUpdateClusterSnapshotPolicyParams() + } + op := &runtime.ClientOperation{ + ID: "UpdateClusterSnapshotPolicy", + Method: "PUT", + PathPattern: "/clusters/snapshot-policy", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &UpdateClusterSnapshotPolicyReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*UpdateClusterSnapshotPolicyOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*UpdateClusterSnapshotPolicyDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + /* UpdateClusterVlan updates vlan diff --git a/v2/client/platform/update_cluster_snapshot_policy_parameters.go b/v2/client/platform/update_cluster_snapshot_policy_parameters.go new file mode 100644 index 00000000..50ae41ac --- /dev/null +++ b/v2/client/platform/update_cluster_snapshot_policy_parameters.go @@ -0,0 +1,153 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package platform + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/cohesity/go-sdk/v2/models" +) + +// NewUpdateClusterSnapshotPolicyParams creates a new UpdateClusterSnapshotPolicyParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewUpdateClusterSnapshotPolicyParams() *UpdateClusterSnapshotPolicyParams { + return &UpdateClusterSnapshotPolicyParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewUpdateClusterSnapshotPolicyParamsWithTimeout creates a new UpdateClusterSnapshotPolicyParams object +// with the ability to set a timeout on a request. +func NewUpdateClusterSnapshotPolicyParamsWithTimeout(timeout time.Duration) *UpdateClusterSnapshotPolicyParams { + return &UpdateClusterSnapshotPolicyParams{ + timeout: timeout, + } +} + +// NewUpdateClusterSnapshotPolicyParamsWithContext creates a new UpdateClusterSnapshotPolicyParams object +// with the ability to set a context for a request. +func NewUpdateClusterSnapshotPolicyParamsWithContext(ctx context.Context) *UpdateClusterSnapshotPolicyParams { + return &UpdateClusterSnapshotPolicyParams{ + Context: ctx, + } +} + +// NewUpdateClusterSnapshotPolicyParamsWithHTTPClient creates a new UpdateClusterSnapshotPolicyParams object +// with the ability to set a custom HTTPClient for a request. +func NewUpdateClusterSnapshotPolicyParamsWithHTTPClient(client *http.Client) *UpdateClusterSnapshotPolicyParams { + return &UpdateClusterSnapshotPolicyParams{ + HTTPClient: client, + } +} + +/* +UpdateClusterSnapshotPolicyParams contains all the parameters to send to the API endpoint + + for the update cluster snapshot policy operation. + + Typically these are written to a http.Request. +*/ +type UpdateClusterSnapshotPolicyParams struct { + + /* Body. + + Specifies the parameters to update cluster snapshot policy. + */ + Body *models.UpdateSnapshotPolicyParams + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the update cluster snapshot policy params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *UpdateClusterSnapshotPolicyParams) WithDefaults() *UpdateClusterSnapshotPolicyParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the update cluster snapshot policy params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *UpdateClusterSnapshotPolicyParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the update cluster snapshot policy params +func (o *UpdateClusterSnapshotPolicyParams) WithTimeout(timeout time.Duration) *UpdateClusterSnapshotPolicyParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the update cluster snapshot policy params +func (o *UpdateClusterSnapshotPolicyParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the update cluster snapshot policy params +func (o *UpdateClusterSnapshotPolicyParams) WithContext(ctx context.Context) *UpdateClusterSnapshotPolicyParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the update cluster snapshot policy params +func (o *UpdateClusterSnapshotPolicyParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the update cluster snapshot policy params +func (o *UpdateClusterSnapshotPolicyParams) WithHTTPClient(client *http.Client) *UpdateClusterSnapshotPolicyParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the update cluster snapshot policy params +func (o *UpdateClusterSnapshotPolicyParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the update cluster snapshot policy params +func (o *UpdateClusterSnapshotPolicyParams) WithBody(body *models.UpdateSnapshotPolicyParams) *UpdateClusterSnapshotPolicyParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the update cluster snapshot policy params +func (o *UpdateClusterSnapshotPolicyParams) SetBody(body *models.UpdateSnapshotPolicyParams) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *UpdateClusterSnapshotPolicyParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/v2/client/platform/update_cluster_snapshot_policy_responses.go b/v2/client/platform/update_cluster_snapshot_policy_responses.go new file mode 100644 index 00000000..1c7f2ebf --- /dev/null +++ b/v2/client/platform/update_cluster_snapshot_policy_responses.go @@ -0,0 +1,187 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package platform + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/cohesity/go-sdk/v2/models" +) + +// UpdateClusterSnapshotPolicyReader is a Reader for the UpdateClusterSnapshotPolicy structure. +type UpdateClusterSnapshotPolicyReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *UpdateClusterSnapshotPolicyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewUpdateClusterSnapshotPolicyOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewUpdateClusterSnapshotPolicyDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewUpdateClusterSnapshotPolicyOK creates a UpdateClusterSnapshotPolicyOK with default headers values +func NewUpdateClusterSnapshotPolicyOK() *UpdateClusterSnapshotPolicyOK { + return &UpdateClusterSnapshotPolicyOK{} +} + +/* +UpdateClusterSnapshotPolicyOK describes a response with status code 200, with default header values. + +Success +*/ +type UpdateClusterSnapshotPolicyOK struct { + Payload *models.ClusterSnapshotPolicy +} + +// IsSuccess returns true when this update cluster snapshot policy o k response has a 2xx status code +func (o *UpdateClusterSnapshotPolicyOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this update cluster snapshot policy o k response has a 3xx status code +func (o *UpdateClusterSnapshotPolicyOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update cluster snapshot policy o k response has a 4xx status code +func (o *UpdateClusterSnapshotPolicyOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this update cluster snapshot policy o k response has a 5xx status code +func (o *UpdateClusterSnapshotPolicyOK) IsServerError() bool { + return false +} + +// IsCode returns true when this update cluster snapshot policy o k response a status code equal to that given +func (o *UpdateClusterSnapshotPolicyOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the update cluster snapshot policy o k response +func (o *UpdateClusterSnapshotPolicyOK) Code() int { + return 200 +} + +func (o *UpdateClusterSnapshotPolicyOK) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /clusters/snapshot-policy][%d] updateClusterSnapshotPolicyOK %s", 200, payload) +} + +func (o *UpdateClusterSnapshotPolicyOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /clusters/snapshot-policy][%d] updateClusterSnapshotPolicyOK %s", 200, payload) +} + +func (o *UpdateClusterSnapshotPolicyOK) GetPayload() *models.ClusterSnapshotPolicy { + return o.Payload +} + +func (o *UpdateClusterSnapshotPolicyOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ClusterSnapshotPolicy) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUpdateClusterSnapshotPolicyDefault creates a UpdateClusterSnapshotPolicyDefault with default headers values +func NewUpdateClusterSnapshotPolicyDefault(code int) *UpdateClusterSnapshotPolicyDefault { + return &UpdateClusterSnapshotPolicyDefault{ + _statusCode: code, + } +} + +/* +UpdateClusterSnapshotPolicyDefault describes a response with status code -1, with default header values. + +Error +*/ +type UpdateClusterSnapshotPolicyDefault struct { + _statusCode int + + Payload *models.Error +} + +// IsSuccess returns true when this update cluster snapshot policy default response has a 2xx status code +func (o *UpdateClusterSnapshotPolicyDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this update cluster snapshot policy default response has a 3xx status code +func (o *UpdateClusterSnapshotPolicyDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this update cluster snapshot policy default response has a 4xx status code +func (o *UpdateClusterSnapshotPolicyDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this update cluster snapshot policy default response has a 5xx status code +func (o *UpdateClusterSnapshotPolicyDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this update cluster snapshot policy default response a status code equal to that given +func (o *UpdateClusterSnapshotPolicyDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the update cluster snapshot policy default response +func (o *UpdateClusterSnapshotPolicyDefault) Code() int { + return o._statusCode +} + +func (o *UpdateClusterSnapshotPolicyDefault) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /clusters/snapshot-policy][%d] UpdateClusterSnapshotPolicy default %s", o._statusCode, payload) +} + +func (o *UpdateClusterSnapshotPolicyDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /clusters/snapshot-policy][%d] UpdateClusterSnapshotPolicy default %s", o._statusCode, payload) +} + +func (o *UpdateClusterSnapshotPolicyDefault) GetPayload() *models.Error { + return o.Payload +} + +func (o *UpdateClusterSnapshotPolicyDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/v2/client/protection_group/get_protection_group_runs_parameters.go b/v2/client/protection_group/get_protection_group_runs_parameters.go index bf3d6127..e39a9db1 100644 --- a/v2/client/protection_group/get_protection_group_runs_parameters.go +++ b/v2/client/protection_group/get_protection_group_runs_parameters.go @@ -124,6 +124,14 @@ type GetProtectionGroupRunsParams struct { */ LocalBackupRunStatus []string + /* MaxResultCount. + + Identifies the max number of items to be returned. This is specifically to be used with pagination. + + Format: int64 + */ + MaxResultCount *int64 + /* NumRuns. Specifies the max number of runs. If not specified, at most 100 runs will be returned. @@ -138,6 +146,12 @@ type GetProtectionGroupRunsParams struct { */ OnlyReturnSuccessfulCopyRun *bool + /* PaginationCookie. + + Specifies the cookie to fetch the next page of results + */ + PaginationCookie *string + /* ReplicationRunStatus. Specifies a list of replication status, runs matching the status will be returned.
'Running' indicates that the run is still running.
'Canceled' indicates that the run has been canceled.
'Canceling' indicates that the run is in the process of being canceled.
'Failed' indicates that the run has failed.
'Missed' indicates that the run was unable to take place at the scheduled time because the previous run was still happening.
'Succeeded' indicates that the run has finished successfully.
'SucceededWithWarning' indicates that the run finished successfully, but there were some warning messages.
'Paused' indicates that the ongoing run has been paused.
'Skipped' indicates that the run was skipped. @@ -368,6 +382,17 @@ func (o *GetProtectionGroupRunsParams) SetLocalBackupRunStatus(localBackupRunSta o.LocalBackupRunStatus = localBackupRunStatus } +// WithMaxResultCount adds the maxResultCount to the get protection group runs params +func (o *GetProtectionGroupRunsParams) WithMaxResultCount(maxResultCount *int64) *GetProtectionGroupRunsParams { + o.SetMaxResultCount(maxResultCount) + return o +} + +// SetMaxResultCount adds the maxResultCount to the get protection group runs params +func (o *GetProtectionGroupRunsParams) SetMaxResultCount(maxResultCount *int64) { + o.MaxResultCount = maxResultCount +} + // WithNumRuns adds the numRuns to the get protection group runs params func (o *GetProtectionGroupRunsParams) WithNumRuns(numRuns *int64) *GetProtectionGroupRunsParams { o.SetNumRuns(numRuns) @@ -390,6 +415,17 @@ func (o *GetProtectionGroupRunsParams) SetOnlyReturnSuccessfulCopyRun(onlyReturn o.OnlyReturnSuccessfulCopyRun = onlyReturnSuccessfulCopyRun } +// WithPaginationCookie adds the paginationCookie to the get protection group runs params +func (o *GetProtectionGroupRunsParams) WithPaginationCookie(paginationCookie *string) *GetProtectionGroupRunsParams { + o.SetPaginationCookie(paginationCookie) + return o +} + +// SetPaginationCookie adds the paginationCookie to the get protection group runs params +func (o *GetProtectionGroupRunsParams) SetPaginationCookie(paginationCookie *string) { + o.PaginationCookie = paginationCookie +} + // WithReplicationRunStatus adds the replicationRunStatus to the get protection group runs params func (o *GetProtectionGroupRunsParams) WithReplicationRunStatus(replicationRunStatus []string) *GetProtectionGroupRunsParams { o.SetReplicationRunStatus(replicationRunStatus) @@ -637,6 +673,23 @@ func (o *GetProtectionGroupRunsParams) WriteToRequest(r runtime.ClientRequest, r } } + if o.MaxResultCount != nil { + + // query param maxResultCount + var qrMaxResultCount int64 + + if o.MaxResultCount != nil { + qrMaxResultCount = *o.MaxResultCount + } + qMaxResultCount := swag.FormatInt64(qrMaxResultCount) + if qMaxResultCount != "" { + + if err := r.SetQueryParam("maxResultCount", qMaxResultCount); err != nil { + return err + } + } + } + if o.NumRuns != nil { // query param numRuns @@ -671,6 +724,23 @@ func (o *GetProtectionGroupRunsParams) WriteToRequest(r runtime.ClientRequest, r } } + if o.PaginationCookie != nil { + + // query param paginationCookie + var qrPaginationCookie string + + if o.PaginationCookie != nil { + qrPaginationCookie = *o.PaginationCookie + } + qPaginationCookie := qrPaginationCookie + if qPaginationCookie != "" { + + if err := r.SetQueryParam("paginationCookie", qPaginationCookie); err != nil { + return err + } + } + } + if o.ReplicationRunStatus != nil { // binding items for replicationRunStatus diff --git a/v2/client/protection_group/get_protection_groups_parameters.go b/v2/client/protection_group/get_protection_groups_parameters.go index 1b0e4509..4b811f22 100644 --- a/v2/client/protection_group/get_protection_groups_parameters.go +++ b/v2/client/protection_group/get_protection_groups_parameters.go @@ -146,6 +146,14 @@ type GetProtectionGroupsParams struct { */ LastRunReplicationStatus []string + /* MaxResultCount. + + Identifies the max number of items to be returned. This is specifically to be used with pagination. + + Format: int64 + */ + MaxResultCount *int64 + /* Names. Filter by a list of Protection Group names. @@ -155,6 +163,12 @@ type GetProtectionGroupsParams struct { // Office365Workloads. Office365Workloads []string + /* PaginationCookie. + + Specifies the cookie to fetch the set page of results + */ + PaginationCookie *string + /* PolicyIds. Filter by Policy ids that are associated with Protection Groups. Only Protection Groups associated with the specified Policy ids, are returned. @@ -412,6 +426,17 @@ func (o *GetProtectionGroupsParams) SetLastRunReplicationStatus(lastRunReplicati o.LastRunReplicationStatus = lastRunReplicationStatus } +// WithMaxResultCount adds the maxResultCount to the get protection groups params +func (o *GetProtectionGroupsParams) WithMaxResultCount(maxResultCount *int64) *GetProtectionGroupsParams { + o.SetMaxResultCount(maxResultCount) + return o +} + +// SetMaxResultCount adds the maxResultCount to the get protection groups params +func (o *GetProtectionGroupsParams) SetMaxResultCount(maxResultCount *int64) { + o.MaxResultCount = maxResultCount +} + // WithNames adds the names to the get protection groups params func (o *GetProtectionGroupsParams) WithNames(names []string) *GetProtectionGroupsParams { o.SetNames(names) @@ -434,6 +459,17 @@ func (o *GetProtectionGroupsParams) SetOffice365Workloads(office365Workloads []s o.Office365Workloads = office365Workloads } +// WithPaginationCookie adds the paginationCookie to the get protection groups params +func (o *GetProtectionGroupsParams) WithPaginationCookie(paginationCookie *string) *GetProtectionGroupsParams { + o.SetPaginationCookie(paginationCookie) + return o +} + +// SetPaginationCookie adds the paginationCookie to the get protection groups params +func (o *GetProtectionGroupsParams) SetPaginationCookie(paginationCookie *string) { + o.PaginationCookie = paginationCookie +} + // WithPolicyIds adds the policyIds to the get protection groups params func (o *GetProtectionGroupsParams) WithPolicyIds(policyIds []string) *GetProtectionGroupsParams { o.SetPolicyIds(policyIds) @@ -726,6 +762,23 @@ func (o *GetProtectionGroupsParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.MaxResultCount != nil { + + // query param maxResultCount + var qrMaxResultCount int64 + + if o.MaxResultCount != nil { + qrMaxResultCount = *o.MaxResultCount + } + qMaxResultCount := swag.FormatInt64(qrMaxResultCount) + if qMaxResultCount != "" { + + if err := r.SetQueryParam("maxResultCount", qMaxResultCount); err != nil { + return err + } + } + } + if o.Names != nil { // binding items for names @@ -748,6 +801,23 @@ func (o *GetProtectionGroupsParams) WriteToRequest(r runtime.ClientRequest, reg } } + if o.PaginationCookie != nil { + + // query param paginationCookie + var qrPaginationCookie string + + if o.PaginationCookie != nil { + qrPaginationCookie = *o.PaginationCookie + } + qPaginationCookie := qrPaginationCookie + if qPaginationCookie != "" { + + if err := r.SetQueryParam("paginationCookie", qPaginationCookie); err != nil { + return err + } + } + } + if o.PolicyIds != nil { // binding items for policyIds diff --git a/v2/client/remote_clusters/get_remote_clusters_parameters.go b/v2/client/remote_clusters/get_remote_clusters_parameters.go index f6b6d1df..ee762538 100644 --- a/v2/client/remote_clusters/get_remote_clusters_parameters.go +++ b/v2/client/remote_clusters/get_remote_clusters_parameters.go @@ -74,6 +74,12 @@ type GetRemoteClustersParams struct { */ ClusterNames []string + /* IncludeEncryptedCredentials. + + If true, the response will include encrypted password. + */ + IncludeEncryptedCredentials *bool + /* NodeAddresses. Specifies a list of Remote Cluster IPs to filter. @@ -161,6 +167,17 @@ func (o *GetRemoteClustersParams) SetClusterNames(clusterNames []string) { o.ClusterNames = clusterNames } +// WithIncludeEncryptedCredentials adds the includeEncryptedCredentials to the get remote clusters params +func (o *GetRemoteClustersParams) WithIncludeEncryptedCredentials(includeEncryptedCredentials *bool) *GetRemoteClustersParams { + o.SetIncludeEncryptedCredentials(includeEncryptedCredentials) + return o +} + +// SetIncludeEncryptedCredentials adds the includeEncryptedCredentials to the get remote clusters params +func (o *GetRemoteClustersParams) SetIncludeEncryptedCredentials(includeEncryptedCredentials *bool) { + o.IncludeEncryptedCredentials = includeEncryptedCredentials +} + // WithNodeAddresses adds the nodeAddresses to the get remote clusters params func (o *GetRemoteClustersParams) WithNodeAddresses(nodeAddresses []string) *GetRemoteClustersParams { o.SetNodeAddresses(nodeAddresses) @@ -213,6 +230,23 @@ func (o *GetRemoteClustersParams) WriteToRequest(r runtime.ClientRequest, reg st } } + if o.IncludeEncryptedCredentials != nil { + + // query param includeEncryptedCredentials + var qrIncludeEncryptedCredentials bool + + if o.IncludeEncryptedCredentials != nil { + qrIncludeEncryptedCredentials = *o.IncludeEncryptedCredentials + } + qIncludeEncryptedCredentials := swag.FormatBool(qrIncludeEncryptedCredentials) + if qIncludeEncryptedCredentials != "" { + + if err := r.SetQueryParam("includeEncryptedCredentials", qIncludeEncryptedCredentials); err != nil { + return err + } + } + } + if o.NodeAddresses != nil { // binding items for nodeAddresses diff --git a/v2/client/view/get_views_summary_parameters.go b/v2/client/view/get_views_summary_parameters.go index 4134754f..0f6a9838 100644 --- a/v2/client/view/get_views_summary_parameters.go +++ b/v2/client/view/get_views_summary_parameters.go @@ -62,6 +62,24 @@ GetViewsSummaryParams contains all the parameters to send to the API endpoint */ type GetViewsSummaryParams struct { + /* IncludeDeletedProtectionGroups. + + Specifies if deleted Protection Groups information needs to be returned along with view metadata. By default, deleted Protection Groups are not returned. This is only applied if used along with any view protection related parameter. + */ + IncludeDeletedProtectionGroups *bool + + /* IncludeInternalViews. + + Specifies if internal Views created by the Cohesity Cluster are also returned. In addition, regular Views are returned. + */ + IncludeInternalViews *bool + + /* IncludeTenants. + + IncludeTenants specifies if objects of all the tenants under the hierarchy of the logged in user's organization should be returned. + */ + IncludeTenants *bool + /* MsecsBeforeCurrentTimeToCompare. Specifies the time in msecs before current time to compare with. @@ -70,6 +88,12 @@ type GetViewsSummaryParams struct { */ MsecsBeforeCurrentTimeToCompare *int64 + /* TenantIds. + + TenantIds contains ids of the tenants for which objects are to be returned. + */ + TenantIds []string + /* UseCachedData. Specifies whether we can serve the GET request to the read replica cache. There is a lag of 15 seconds between the read replica and primary data source. @@ -129,6 +153,39 @@ func (o *GetViewsSummaryParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } +// WithIncludeDeletedProtectionGroups adds the includeDeletedProtectionGroups to the get views summary params +func (o *GetViewsSummaryParams) WithIncludeDeletedProtectionGroups(includeDeletedProtectionGroups *bool) *GetViewsSummaryParams { + o.SetIncludeDeletedProtectionGroups(includeDeletedProtectionGroups) + return o +} + +// SetIncludeDeletedProtectionGroups adds the includeDeletedProtectionGroups to the get views summary params +func (o *GetViewsSummaryParams) SetIncludeDeletedProtectionGroups(includeDeletedProtectionGroups *bool) { + o.IncludeDeletedProtectionGroups = includeDeletedProtectionGroups +} + +// WithIncludeInternalViews adds the includeInternalViews to the get views summary params +func (o *GetViewsSummaryParams) WithIncludeInternalViews(includeInternalViews *bool) *GetViewsSummaryParams { + o.SetIncludeInternalViews(includeInternalViews) + return o +} + +// SetIncludeInternalViews adds the includeInternalViews to the get views summary params +func (o *GetViewsSummaryParams) SetIncludeInternalViews(includeInternalViews *bool) { + o.IncludeInternalViews = includeInternalViews +} + +// WithIncludeTenants adds the includeTenants to the get views summary params +func (o *GetViewsSummaryParams) WithIncludeTenants(includeTenants *bool) *GetViewsSummaryParams { + o.SetIncludeTenants(includeTenants) + return o +} + +// SetIncludeTenants adds the includeTenants to the get views summary params +func (o *GetViewsSummaryParams) SetIncludeTenants(includeTenants *bool) { + o.IncludeTenants = includeTenants +} + // WithMsecsBeforeCurrentTimeToCompare adds the msecsBeforeCurrentTimeToCompare to the get views summary params func (o *GetViewsSummaryParams) WithMsecsBeforeCurrentTimeToCompare(msecsBeforeCurrentTimeToCompare *int64) *GetViewsSummaryParams { o.SetMsecsBeforeCurrentTimeToCompare(msecsBeforeCurrentTimeToCompare) @@ -140,6 +197,17 @@ func (o *GetViewsSummaryParams) SetMsecsBeforeCurrentTimeToCompare(msecsBeforeCu o.MsecsBeforeCurrentTimeToCompare = msecsBeforeCurrentTimeToCompare } +// WithTenantIds adds the tenantIds to the get views summary params +func (o *GetViewsSummaryParams) WithTenantIds(tenantIds []string) *GetViewsSummaryParams { + o.SetTenantIds(tenantIds) + return o +} + +// SetTenantIds adds the tenantIds to the get views summary params +func (o *GetViewsSummaryParams) SetTenantIds(tenantIds []string) { + o.TenantIds = tenantIds +} + // WithUseCachedData adds the useCachedData to the get views summary params func (o *GetViewsSummaryParams) WithUseCachedData(useCachedData *bool) *GetViewsSummaryParams { o.SetUseCachedData(useCachedData) @@ -159,6 +227,57 @@ func (o *GetViewsSummaryParams) WriteToRequest(r runtime.ClientRequest, reg strf } var res []error + if o.IncludeDeletedProtectionGroups != nil { + + // query param includeDeletedProtectionGroups + var qrIncludeDeletedProtectionGroups bool + + if o.IncludeDeletedProtectionGroups != nil { + qrIncludeDeletedProtectionGroups = *o.IncludeDeletedProtectionGroups + } + qIncludeDeletedProtectionGroups := swag.FormatBool(qrIncludeDeletedProtectionGroups) + if qIncludeDeletedProtectionGroups != "" { + + if err := r.SetQueryParam("includeDeletedProtectionGroups", qIncludeDeletedProtectionGroups); err != nil { + return err + } + } + } + + if o.IncludeInternalViews != nil { + + // query param includeInternalViews + var qrIncludeInternalViews bool + + if o.IncludeInternalViews != nil { + qrIncludeInternalViews = *o.IncludeInternalViews + } + qIncludeInternalViews := swag.FormatBool(qrIncludeInternalViews) + if qIncludeInternalViews != "" { + + if err := r.SetQueryParam("includeInternalViews", qIncludeInternalViews); err != nil { + return err + } + } + } + + if o.IncludeTenants != nil { + + // query param includeTenants + var qrIncludeTenants bool + + if o.IncludeTenants != nil { + qrIncludeTenants = *o.IncludeTenants + } + qIncludeTenants := swag.FormatBool(qrIncludeTenants) + if qIncludeTenants != "" { + + if err := r.SetQueryParam("includeTenants", qIncludeTenants); err != nil { + return err + } + } + } + if o.MsecsBeforeCurrentTimeToCompare != nil { // query param msecsBeforeCurrentTimeToCompare @@ -176,6 +295,17 @@ func (o *GetViewsSummaryParams) WriteToRequest(r runtime.ClientRequest, reg strf } } + if o.TenantIds != nil { + + // binding items for tenantIds + joinedTenantIds := o.bindParamTenantIds(reg) + + // query array param tenantIds + if err := r.SetQueryParam("tenantIds", joinedTenantIds...); err != nil { + return err + } + } + if o.UseCachedData != nil { // query param useCachedData @@ -198,3 +328,20 @@ func (o *GetViewsSummaryParams) WriteToRequest(r runtime.ClientRequest, reg strf } return nil } + +// bindParamGetViewsSummary binds the parameter tenantIds +func (o *GetViewsSummaryParams) bindParamTenantIds(formats strfmt.Registry) []string { + tenantIdsIR := o.TenantIds + + var tenantIdsIC []string + for _, tenantIdsIIR := range tenantIdsIR { // explode []string + + tenantIdsIIV := tenantIdsIIR // string as string + tenantIdsIC = append(tenantIdsIC, tenantIdsIIV) + } + + // items.CollectionFormat: "" + tenantIdsIS := swag.JoinByFormat(tenantIdsIC, "") + + return tenantIdsIS +} diff --git a/v2/models/archival_s3_comp_external_target_params.go b/v2/models/archival_s3_comp_external_target_params.go index 32e24bed..831325ec 100644 --- a/v2/models/archival_s3_comp_external_target_params.go +++ b/v2/models/archival_s3_comp_external_target_params.go @@ -35,6 +35,9 @@ type ArchivalS3CompExternalTargetParams struct { // Specifies if Forever Incremental Archival setting is enabled or not. IsForeverIncrementalArchivalEnabled *bool `json:"isForeverIncrementalArchivalEnabled,omitempty"` + + // Specifies the account Id of the S3 bucket owner. + BucketOwnerAccountID *string `json:"bucketOwnerAccountId,omitempty"` } // UnmarshalJSON unmarshals this object from a JSON structure @@ -55,6 +58,8 @@ func (m *ArchivalS3CompExternalTargetParams) UnmarshalJSON(raw []byte) error { IsIncrementalArchivalEnabled *bool `json:"isIncrementalArchivalEnabled,omitempty"` IsForeverIncrementalArchivalEnabled *bool `json:"isForeverIncrementalArchivalEnabled,omitempty"` + + BucketOwnerAccountID *string `json:"bucketOwnerAccountId,omitempty"` } if err := swag.ReadJSON(raw, &dataAO1); err != nil { return err @@ -68,6 +73,8 @@ func (m *ArchivalS3CompExternalTargetParams) UnmarshalJSON(raw []byte) error { m.IsForeverIncrementalArchivalEnabled = dataAO1.IsForeverIncrementalArchivalEnabled + m.BucketOwnerAccountID = dataAO1.BucketOwnerAccountID + return nil } @@ -88,6 +95,8 @@ func (m ArchivalS3CompExternalTargetParams) MarshalJSON() ([]byte, error) { IsIncrementalArchivalEnabled *bool `json:"isIncrementalArchivalEnabled,omitempty"` IsForeverIncrementalArchivalEnabled *bool `json:"isForeverIncrementalArchivalEnabled,omitempty"` + + BucketOwnerAccountID *string `json:"bucketOwnerAccountId,omitempty"` } dataAO1.StorageClass = m.StorageClass @@ -98,6 +107,8 @@ func (m ArchivalS3CompExternalTargetParams) MarshalJSON() ([]byte, error) { dataAO1.IsForeverIncrementalArchivalEnabled = m.IsForeverIncrementalArchivalEnabled + dataAO1.BucketOwnerAccountID = m.BucketOwnerAccountID + jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) if errAO1 != nil { return nil, errAO1 diff --git a/v2/models/audit_entity_types.go b/v2/models/audit_entity_types.go index 11ea9292..4c090757 100644 --- a/v2/models/audit_entity_types.go +++ b/v2/models/audit_entity_types.go @@ -23,7 +23,7 @@ import ( type AuditEntityTypes struct { // Entity Types - // Enum: ["ClusterPartition","StorageDomain","View","Share","Node","Disk","Cluster","Vlan","User","ApiKey","Chassis","SslCertificate","ProtectionGroup","Source","RecoveryTask","SmtpServer","EncryptionKey","ProtectionPolicy","Alert","Resolution","AlertNotificationRule","Vault","RemoteCluster","ActiveDirectory","KerberosProvider","Ldap","AntivirusServiceGroup","InfectedFile","PreferredDomainController","Group","Role","ProtectionRun","SearchJob","PhysicalAgent","CloneTask","CloneRefreshTask","Network","Interface","NetworkInerfaceGroup","Scheduler","ProxyServer","StaticRoute","Ip","Qos","KmsConfiguration","CloudSpin","Tenant","IdpConfiguration","App","HeliosEvent","Object","ClusterServices","AccessToken","SnmpConfig","IoTier","ServiceFlag","SupportServer","Csr","Keystone","SwiftRoles","Tags","Nis","Snapshot","HybridExtender","DataTieringAnalysisGroup","DataTieringDowntierTask","DataTieringUptierTask","TrustedCA","AMQPTargetConfiguration","Patch","Hotfix","NisNetgroup","QuorumGroup","QuorumApplication","BifrostConnection","BifrostConnector","HostMapping","FirewallSetting"] + // Enum: ["ClusterPartition","StorageDomain","View","Share","Node","Disk","Cluster","Vlan","User","ApiKey","Chassis","SslCertificate","ProtectionGroup","Source","RecoveryTask","SmtpServer","EncryptionKey","ProtectionPolicy","Alert","Resolution","AlertNotificationRule","Vault","RemoteCluster","ActiveDirectory","KerberosProvider","Ldap","AntivirusServiceGroup","InfectedFile","PreferredDomainController","Group","Role","ProtectionRun","SearchJob","PhysicalAgent","CloneTask","CloneRefreshTask","Network","Interface","NetworkInerfaceGroup","Scheduler","ProxyServer","StaticRoute","Ip","Qos","KmsConfiguration","CloudSpin","Tenant","IdpConfiguration","App","HeliosEvent","Object","ClusterServices","AccessToken","SnmpConfig","IoTier","ServiceFlag","SupportServer","Csr","Keystone","SwiftRoles","Tags","Nis","Snapshot","HybridExtender","DataTieringAnalysisGroup","DataTieringDowntierTask","DataTieringUptierTask","TrustedCA","AMQPTargetConfiguration","Patch","Hotfix","NisNetgroup","QuorumGroup","QuorumApplication","BifrostConnection","BifrostConnector","HostMapping","FirewallSetting","ClusterSnapshotPolicy","NodePower"] EntityTypes string `json:"entityTypes,omitempty"` } @@ -45,7 +45,7 @@ var auditEntityTypesTypeEntityTypesPropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["ClusterPartition","StorageDomain","View","Share","Node","Disk","Cluster","Vlan","User","ApiKey","Chassis","SslCertificate","ProtectionGroup","Source","RecoveryTask","SmtpServer","EncryptionKey","ProtectionPolicy","Alert","Resolution","AlertNotificationRule","Vault","RemoteCluster","ActiveDirectory","KerberosProvider","Ldap","AntivirusServiceGroup","InfectedFile","PreferredDomainController","Group","Role","ProtectionRun","SearchJob","PhysicalAgent","CloneTask","CloneRefreshTask","Network","Interface","NetworkInerfaceGroup","Scheduler","ProxyServer","StaticRoute","Ip","Qos","KmsConfiguration","CloudSpin","Tenant","IdpConfiguration","App","HeliosEvent","Object","ClusterServices","AccessToken","SnmpConfig","IoTier","ServiceFlag","SupportServer","Csr","Keystone","SwiftRoles","Tags","Nis","Snapshot","HybridExtender","DataTieringAnalysisGroup","DataTieringDowntierTask","DataTieringUptierTask","TrustedCA","AMQPTargetConfiguration","Patch","Hotfix","NisNetgroup","QuorumGroup","QuorumApplication","BifrostConnection","BifrostConnector","HostMapping","FirewallSetting"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["ClusterPartition","StorageDomain","View","Share","Node","Disk","Cluster","Vlan","User","ApiKey","Chassis","SslCertificate","ProtectionGroup","Source","RecoveryTask","SmtpServer","EncryptionKey","ProtectionPolicy","Alert","Resolution","AlertNotificationRule","Vault","RemoteCluster","ActiveDirectory","KerberosProvider","Ldap","AntivirusServiceGroup","InfectedFile","PreferredDomainController","Group","Role","ProtectionRun","SearchJob","PhysicalAgent","CloneTask","CloneRefreshTask","Network","Interface","NetworkInerfaceGroup","Scheduler","ProxyServer","StaticRoute","Ip","Qos","KmsConfiguration","CloudSpin","Tenant","IdpConfiguration","App","HeliosEvent","Object","ClusterServices","AccessToken","SnmpConfig","IoTier","ServiceFlag","SupportServer","Csr","Keystone","SwiftRoles","Tags","Nis","Snapshot","HybridExtender","DataTieringAnalysisGroup","DataTieringDowntierTask","DataTieringUptierTask","TrustedCA","AMQPTargetConfiguration","Patch","Hotfix","NisNetgroup","QuorumGroup","QuorumApplication","BifrostConnection","BifrostConnector","HostMapping","FirewallSetting","ClusterSnapshotPolicy","NodePower"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -288,6 +288,12 @@ const ( // AuditEntityTypesEntityTypesFirewallSetting captures enum value "FirewallSetting" AuditEntityTypesEntityTypesFirewallSetting string = "FirewallSetting" + + // AuditEntityTypesEntityTypesClusterSnapshotPolicy captures enum value "ClusterSnapshotPolicy" + AuditEntityTypesEntityTypesClusterSnapshotPolicy string = "ClusterSnapshotPolicy" + + // AuditEntityTypesEntityTypesNodePower captures enum value "NodePower" + AuditEntityTypesEntityTypesNodePower string = "NodePower" ) // prop value enum diff --git a/v2/models/aws_i_am_role_params.go b/v2/models/aws_i_am_role_params.go index 643f3d1b..08f47442 100644 --- a/v2/models/aws_i_am_role_params.go +++ b/v2/models/aws_i_am_role_params.go @@ -22,8 +22,7 @@ import ( type AwsIAmRoleParams struct { // Specifies the Account Id of the external target. - // Required: true - AccountID *string `json:"accountId"` + AccountID *string `json:"accountId,omitempty"` // Specifies the I Am Role of the external target. // Required: true @@ -34,10 +33,6 @@ type AwsIAmRoleParams struct { func (m *AwsIAmRoleParams) Validate(formats strfmt.Registry) error { var res []error - if err := m.validateAccountID(formats); err != nil { - res = append(res, err) - } - if err := m.validateIAmRole(formats); err != nil { res = append(res, err) } @@ -48,15 +43,6 @@ func (m *AwsIAmRoleParams) Validate(formats strfmt.Registry) error { return nil } -func (m *AwsIAmRoleParams) validateAccountID(formats strfmt.Registry) error { - - if err := validate.Required("accountId", "body", m.AccountID); err != nil { - return err - } - - return nil -} - func (m *AwsIAmRoleParams) validateIAmRole(formats strfmt.Registry) error { if err := validate.Required("iAmRole", "body", m.IAmRole); err != nil { diff --git a/v2/models/aws_source_registration_params.go b/v2/models/aws_source_registration_params.go index 63330c58..7f16dfc9 100644 --- a/v2/models/aws_source_registration_params.go +++ b/v2/models/aws_source_registration_params.go @@ -27,6 +27,9 @@ type AwsSourceRegistrationParams struct { // Specifies the parameters to register a commercial AWS. StandardParams *StandardParams `json:"standardParams,omitempty"` + + // Specifies the s3 specific parameters for source registration. + S3Params *S3SpecificParams `json:"s3Params,omitempty"` } // Validate validates this aws source registration params @@ -41,6 +44,10 @@ func (m *AwsSourceRegistrationParams) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateS3Params(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -112,6 +119,25 @@ func (m *AwsSourceRegistrationParams) validateStandardParams(formats strfmt.Regi return nil } +func (m *AwsSourceRegistrationParams) validateS3Params(formats strfmt.Registry) error { + if swag.IsZero(m.S3Params) { // not required + return nil + } + + if m.S3Params != nil { + if err := m.S3Params.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("s3Params") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("s3Params") + } + return err + } + } + + return nil +} + // ContextValidate validate this aws source registration params based on the context it is used func (m *AwsSourceRegistrationParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error @@ -120,6 +146,10 @@ func (m *AwsSourceRegistrationParams) ContextValidate(ctx context.Context, forma res = append(res, err) } + if err := m.contextValidateS3Params(ctx, formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -147,6 +177,27 @@ func (m *AwsSourceRegistrationParams) contextValidateStandardParams(ctx context. return nil } +func (m *AwsSourceRegistrationParams) contextValidateS3Params(ctx context.Context, formats strfmt.Registry) error { + + if m.S3Params != nil { + + if swag.IsZero(m.S3Params) { // not required + return nil + } + + if err := m.S3Params.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("s3Params") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("s3Params") + } + return err + } + } + + return nil +} + // MarshalBinary interface implementation func (m *AwsSourceRegistrationParams) MarshalBinary() ([]byte, error) { if m == nil { diff --git a/v2/models/cipher_suite.go b/v2/models/cipher_suite.go index 906e974d..cc4b0248 100644 --- a/v2/models/cipher_suite.go +++ b/v2/models/cipher_suite.go @@ -23,7 +23,7 @@ import ( type CipherSuite struct { // Specifies the cipher suite used for TLS handshake. - // Enum: ["TLS_AES_256_GCM_SHA384","TLS_AES_128_GCM_SHA256","TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384","TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256","TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384","TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256","TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA","TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA","TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA","TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA","TLS_RSA_WITH_AES_256_GCM_SHA384","TLS_RSA_WITH_AES_128_GCM_SHA256","TLS_RSA_WITH_AES_256_CBC_SHA","TLS_RSA_WITH_AES_128_CBC_SHA"] + // Enum: ["TLS_AES_256_GCM_SHA384","TLS_AES_128_GCM_SHA256","TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384","TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256","TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384","TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256","TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA","TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA","TLS_RSA_WITH_AES_256_GCM_SHA384","TLS_RSA_WITH_AES_128_GCM_SHA256","TLS_RSA_WITH_AES_256_CBC_SHA","TLS_RSA_WITH_AES_128_CBC_SHA"] Cipher string `json:"cipher,omitempty"` } @@ -45,7 +45,7 @@ var cipherSuiteTypeCipherPropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["TLS_AES_256_GCM_SHA384","TLS_AES_128_GCM_SHA256","TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384","TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256","TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384","TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256","TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA","TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA","TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA","TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA","TLS_RSA_WITH_AES_256_GCM_SHA384","TLS_RSA_WITH_AES_128_GCM_SHA256","TLS_RSA_WITH_AES_256_CBC_SHA","TLS_RSA_WITH_AES_128_CBC_SHA"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["TLS_AES_256_GCM_SHA384","TLS_AES_128_GCM_SHA256","TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384","TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256","TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384","TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256","TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA","TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA","TLS_RSA_WITH_AES_256_GCM_SHA384","TLS_RSA_WITH_AES_128_GCM_SHA256","TLS_RSA_WITH_AES_256_CBC_SHA","TLS_RSA_WITH_AES_128_CBC_SHA"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -79,12 +79,6 @@ const ( // CipherSuiteCipherTLSECDHEECDSAWITHAES128CBCSHA captures enum value "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA" CipherSuiteCipherTLSECDHEECDSAWITHAES128CBCSHA string = "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA" - // CipherSuiteCipherTLSECDHERSAWITHAES256CBCSHA captures enum value "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA" - CipherSuiteCipherTLSECDHERSAWITHAES256CBCSHA string = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA" - - // CipherSuiteCipherTLSECDHERSAWITHAES128CBCSHA captures enum value "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA" - CipherSuiteCipherTLSECDHERSAWITHAES128CBCSHA string = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA" - // CipherSuiteCipherTLSRSAWITHAES256GCMSHA384 captures enum value "TLS_RSA_WITH_AES_256_GCM_SHA384" CipherSuiteCipherTLSRSAWITHAES256GCMSHA384 string = "TLS_RSA_WITH_AES_256_GCM_SHA384" diff --git a/v2/models/ciphers_resp.go b/v2/models/ciphers_resp.go index dc893de5..567bd2e6 100644 --- a/v2/models/ciphers_resp.go +++ b/v2/models/ciphers_resp.go @@ -52,7 +52,7 @@ var ciphersRespEnabledCiphersItemsEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["TLS_AES_256_GCM_SHA384","TLS_AES_128_GCM_SHA256","TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384","TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256","TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384","TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256","TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA","TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA","TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA","TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA","TLS_RSA_WITH_AES_256_GCM_SHA384","TLS_RSA_WITH_AES_128_GCM_SHA256","TLS_RSA_WITH_AES_256_CBC_SHA","TLS_RSA_WITH_AES_128_CBC_SHA"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["TLS_AES_256_GCM_SHA384","TLS_AES_128_GCM_SHA256","TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384","TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256","TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384","TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256","TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA","TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA","TLS_RSA_WITH_AES_256_GCM_SHA384","TLS_RSA_WITH_AES_128_GCM_SHA256","TLS_RSA_WITH_AES_256_CBC_SHA","TLS_RSA_WITH_AES_128_CBC_SHA"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -88,7 +88,7 @@ var ciphersRespDisabledCiphersItemsEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["TLS_AES_256_GCM_SHA384","TLS_AES_128_GCM_SHA256","TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384","TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256","TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384","TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256","TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA","TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA","TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA","TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA","TLS_RSA_WITH_AES_256_GCM_SHA384","TLS_RSA_WITH_AES_128_GCM_SHA256","TLS_RSA_WITH_AES_256_CBC_SHA","TLS_RSA_WITH_AES_128_CBC_SHA"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["TLS_AES_256_GCM_SHA384","TLS_AES_128_GCM_SHA256","TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384","TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256","TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384","TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256","TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA","TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA","TLS_RSA_WITH_AES_256_GCM_SHA384","TLS_RSA_WITH_AES_128_GCM_SHA256","TLS_RSA_WITH_AES_256_CBC_SHA","TLS_RSA_WITH_AES_128_CBC_SHA"]`), &res); err != nil { panic(err) } for _, v := range res { diff --git a/v2/models/cluster_snapshot_policy.go b/v2/models/cluster_snapshot_policy.go new file mode 100644 index 00000000..92f3144b --- /dev/null +++ b/v2/models/cluster_snapshot_policy.go @@ -0,0 +1,162 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// ClusterSnapshotPolicy Snapshot Policy struct. +// +// Describes the snapshot policy struct. +// +// swagger:model ClusterSnapshotPolicy +type ClusterSnapshotPolicy struct { + + // Snapshot schedule policy. + SnapshotSchedulePolicy *SnapshotSchedulePolicy `json:"snapshotSchedulePolicy,omitempty"` + + // Snapshot retention policy. + SnapshotRetentionPolicy *SnapshotRetentionPolicy `json:"snapshotRetentionPolicy,omitempty"` +} + +// Validate validates this cluster snapshot policy +func (m *ClusterSnapshotPolicy) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateSnapshotSchedulePolicy(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSnapshotRetentionPolicy(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ClusterSnapshotPolicy) validateSnapshotSchedulePolicy(formats strfmt.Registry) error { + if swag.IsZero(m.SnapshotSchedulePolicy) { // not required + return nil + } + + if m.SnapshotSchedulePolicy != nil { + if err := m.SnapshotSchedulePolicy.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("snapshotSchedulePolicy") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("snapshotSchedulePolicy") + } + return err + } + } + + return nil +} + +func (m *ClusterSnapshotPolicy) validateSnapshotRetentionPolicy(formats strfmt.Registry) error { + if swag.IsZero(m.SnapshotRetentionPolicy) { // not required + return nil + } + + if m.SnapshotRetentionPolicy != nil { + if err := m.SnapshotRetentionPolicy.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("snapshotRetentionPolicy") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("snapshotRetentionPolicy") + } + return err + } + } + + return nil +} + +// ContextValidate validate this cluster snapshot policy based on the context it is used +func (m *ClusterSnapshotPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateSnapshotSchedulePolicy(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateSnapshotRetentionPolicy(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ClusterSnapshotPolicy) contextValidateSnapshotSchedulePolicy(ctx context.Context, formats strfmt.Registry) error { + + if m.SnapshotSchedulePolicy != nil { + + if swag.IsZero(m.SnapshotSchedulePolicy) { // not required + return nil + } + + if err := m.SnapshotSchedulePolicy.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("snapshotSchedulePolicy") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("snapshotSchedulePolicy") + } + return err + } + } + + return nil +} + +func (m *ClusterSnapshotPolicy) contextValidateSnapshotRetentionPolicy(ctx context.Context, formats strfmt.Registry) error { + + if m.SnapshotRetentionPolicy != nil { + + if swag.IsZero(m.SnapshotRetentionPolicy) { // not required + return nil + } + + if err := m.SnapshotRetentionPolicy.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("snapshotRetentionPolicy") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("snapshotRetentionPolicy") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ClusterSnapshotPolicy) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ClusterSnapshotPolicy) UnmarshalBinary(b []byte) error { + var res ClusterSnapshotPolicy + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/v2/models/common_archival_aws_external_target_params.go b/v2/models/common_archival_aws_external_target_params.go index 3430c17f..a9252426 100644 --- a/v2/models/common_archival_aws_external_target_params.go +++ b/v2/models/common_archival_aws_external_target_params.go @@ -36,6 +36,9 @@ type CommonArchivalAwsExternalTargetParams struct { // Specifies if Forever Incremental Archival setting is enabled or not. IsForeverIncrementalArchivalEnabled *bool `json:"isForeverIncrementalArchivalEnabled,omitempty"` + + // Specifies the account Id of the S3 bucket owner. + BucketOwnerAccountID *string `json:"bucketOwnerAccountId,omitempty"` } // UnmarshalJSON unmarshals this object from a JSON structure @@ -56,6 +59,8 @@ func (m *CommonArchivalAwsExternalTargetParams) UnmarshalJSON(raw []byte) error IsIncrementalArchivalEnabled *bool `json:"isIncrementalArchivalEnabled,omitempty"` IsForeverIncrementalArchivalEnabled *bool `json:"isForeverIncrementalArchivalEnabled,omitempty"` + + BucketOwnerAccountID *string `json:"bucketOwnerAccountId,omitempty"` } if err := swag.ReadJSON(raw, &dataAO1); err != nil { return err @@ -69,6 +74,8 @@ func (m *CommonArchivalAwsExternalTargetParams) UnmarshalJSON(raw []byte) error m.IsForeverIncrementalArchivalEnabled = dataAO1.IsForeverIncrementalArchivalEnabled + m.BucketOwnerAccountID = dataAO1.BucketOwnerAccountID + return nil } @@ -89,6 +96,8 @@ func (m CommonArchivalAwsExternalTargetParams) MarshalJSON() ([]byte, error) { IsIncrementalArchivalEnabled *bool `json:"isIncrementalArchivalEnabled,omitempty"` IsForeverIncrementalArchivalEnabled *bool `json:"isForeverIncrementalArchivalEnabled,omitempty"` + + BucketOwnerAccountID *string `json:"bucketOwnerAccountId,omitempty"` } dataAO1.StorageClass = m.StorageClass @@ -99,6 +108,8 @@ func (m CommonArchivalAwsExternalTargetParams) MarshalJSON() ([]byte, error) { dataAO1.IsForeverIncrementalArchivalEnabled = m.IsForeverIncrementalArchivalEnabled + dataAO1.BucketOwnerAccountID = m.BucketOwnerAccountID + jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) if errAO1 != nil { return nil, errAO1 diff --git a/v2/models/database_entity_info.go b/v2/models/database_entity_info.go index 6cd4b733..7bc53caf 100644 --- a/v2/models/database_entity_info.go +++ b/v2/models/database_entity_info.go @@ -7,10 +7,12 @@ package models import ( "context" + "encoding/json" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // DatabaseEntityInfo Object details about Oracle database entity info. @@ -23,6 +25,10 @@ type DatabaseEntityInfo struct { // Specifies the dataguard information about container database. DataGuardInfo *OracleDataGuardInfo `json:"dataGuardInfo,omitempty"` + + // Specifies database type of oracle database. + // Enum: ["kSingleInstance","kRACDatabase"] + DbType *string `json:"dbType,omitempty"` } // Validate validates this database entity info @@ -37,6 +43,10 @@ func (m *DatabaseEntityInfo) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateDbType(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -81,6 +91,48 @@ func (m *DatabaseEntityInfo) validateDataGuardInfo(formats strfmt.Registry) erro return nil } +var databaseEntityInfoTypeDbTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["kSingleInstance","kRACDatabase"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + databaseEntityInfoTypeDbTypePropEnum = append(databaseEntityInfoTypeDbTypePropEnum, v) + } +} + +const ( + + // DatabaseEntityInfoDbTypeKSingleInstance captures enum value "kSingleInstance" + DatabaseEntityInfoDbTypeKSingleInstance string = "kSingleInstance" + + // DatabaseEntityInfoDbTypeKRACDatabase captures enum value "kRACDatabase" + DatabaseEntityInfoDbTypeKRACDatabase string = "kRACDatabase" +) + +// prop value enum +func (m *DatabaseEntityInfo) validateDbTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, databaseEntityInfoTypeDbTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *DatabaseEntityInfo) validateDbType(formats strfmt.Registry) error { + if swag.IsZero(m.DbType) { // not required + return nil + } + + // value enum + if err := m.validateDbTypeEnum("dbType", "body", *m.DbType); err != nil { + return err + } + + return nil +} + // ContextValidate validate this database entity info based on the context it is used func (m *DatabaseEntityInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error diff --git a/v2/models/entity_identifiers.go b/v2/models/entity_identifiers.go new file mode 100644 index 00000000..a07a8b50 --- /dev/null +++ b/v2/models/entity_identifiers.go @@ -0,0 +1,59 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// EntityIdentifiers Specifies the identifiers for an entity. +// +// swagger:model EntityIdentifiers +type EntityIdentifiers struct { + + // Specifies the type of identifier. For example, a Virtual Machine (VM) can be identified through various types of IDs, such as UUID, Managed Object Reference (moref), or other unique identifiers. + Key *string `json:"key,omitempty"` + + // Specifies the value of the identifier corresponding to the type specified in the key. + Value *string `json:"value,omitempty"` + + // Specifies the link to documentation or additional information about the entity. This URL can be used to access more detailed information, guidelines, or metadata related to the entity id. It helps in understanding the context or usage of the entity id. + DocumentationLink *string `json:"documentationLink,omitempty"` + + // Specifies the version number associated with this EntityIdentifier + Version *int64 `json:"version,omitempty"` +} + +// Validate validates this entity identifiers +func (m *EntityIdentifiers) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this entity identifiers based on context it is used +func (m *EntityIdentifiers) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *EntityIdentifiers) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *EntityIdentifiers) UnmarshalBinary(b []byte) error { + var res EntityIdentifiers + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/v2/models/legal_hold.go b/v2/models/legal_hold.go new file mode 100644 index 00000000..edf75ce1 --- /dev/null +++ b/v2/models/legal_hold.go @@ -0,0 +1,107 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// LegalHold LegalHoldActionType +// +// Legal hold action type for protection runs. +// +// swagger:model legalHold +type LegalHold struct { + + // The action type for legal hold on a protection run i.e. enable or release + // Enum: ["Enable","Release"] + ActionType string `json:"actionType,omitempty"` +} + +// Validate validates this legal hold +func (m *LegalHold) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateActionType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var legalHoldTypeActionTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["Enable","Release"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + legalHoldTypeActionTypePropEnum = append(legalHoldTypeActionTypePropEnum, v) + } +} + +const ( + + // LegalHoldActionTypeEnable captures enum value "Enable" + LegalHoldActionTypeEnable string = "Enable" + + // LegalHoldActionTypeRelease captures enum value "Release" + LegalHoldActionTypeRelease string = "Release" +) + +// prop value enum +func (m *LegalHold) validateActionTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, legalHoldTypeActionTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *LegalHold) validateActionType(formats strfmt.Registry) error { + if swag.IsZero(m.ActionType) { // not required + return nil + } + + // value enum + if err := m.validateActionTypeEnum("actionType", "body", m.ActionType); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this legal hold based on context it is used +func (m *LegalHold) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *LegalHold) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *LegalHold) UnmarshalBinary(b []byte) error { + var res LegalHold + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/v2/models/modify_ciphers_request_body.go b/v2/models/modify_ciphers_request_body.go index 394ca635..499576fe 100644 --- a/v2/models/modify_ciphers_request_body.go +++ b/v2/models/modify_ciphers_request_body.go @@ -63,7 +63,7 @@ var modifyCiphersRequestBodyCiphersItemsEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["TLS_AES_256_GCM_SHA384","TLS_AES_128_GCM_SHA256","TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384","TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256","TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384","TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256","TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA","TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA","TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA","TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA","TLS_RSA_WITH_AES_256_GCM_SHA384","TLS_RSA_WITH_AES_128_GCM_SHA256","TLS_RSA_WITH_AES_256_CBC_SHA","TLS_RSA_WITH_AES_128_CBC_SHA"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["TLS_AES_256_GCM_SHA384","TLS_AES_128_GCM_SHA256","TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384","TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256","TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384","TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256","TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA","TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA","TLS_RSA_WITH_AES_256_GCM_SHA384","TLS_RSA_WITH_AES_128_GCM_SHA256","TLS_RSA_WITH_AES_256_CBC_SHA","TLS_RSA_WITH_AES_128_CBC_SHA"]`), &res); err != nil { panic(err) } for _, v := range res { diff --git a/v2/models/modify_object_store_ciphers_request_body.go b/v2/models/modify_object_store_ciphers_request_body.go index 1f73da42..73cd677a 100644 --- a/v2/models/modify_object_store_ciphers_request_body.go +++ b/v2/models/modify_object_store_ciphers_request_body.go @@ -65,7 +65,7 @@ var modifyObjectStoreCiphersRequestBodyCiphersItemsEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["TLS_AES_256_GCM_SHA384","TLS_AES_128_GCM_SHA256","TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384","TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256","TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384","TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256","TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA","TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA","TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA","TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA","TLS_RSA_WITH_AES_256_GCM_SHA384","TLS_RSA_WITH_AES_128_GCM_SHA256","TLS_RSA_WITH_AES_256_CBC_SHA","TLS_RSA_WITH_AES_128_CBC_SHA"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["TLS_AES_256_GCM_SHA384","TLS_AES_128_GCM_SHA256","TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384","TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256","TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384","TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256","TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA","TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA","TLS_RSA_WITH_AES_256_GCM_SHA384","TLS_RSA_WITH_AES_128_GCM_SHA256","TLS_RSA_WITH_AES_256_CBC_SHA","TLS_RSA_WITH_AES_128_CBC_SHA"]`), &res); err != nil { panic(err) } for _, v := range res { diff --git a/v2/models/object_identifier.go b/v2/models/object_identifier.go index 16ae3720..6d0821f9 100644 --- a/v2/models/object_identifier.go +++ b/v2/models/object_identifier.go @@ -37,6 +37,9 @@ type ObjectIdentifier struct { // Specifies the environment of the object. // Enum: ["kVMware","kHyperV","kAzure","kKVM","kAWS","kAzureSQL","kAcropolis","kGCP","kPhysical","kPhysicalFiles","kIsilon","kNetapp","kGenericNas","kFlashBlade","kElastifile","kGPFS","kPure","kIbmFlashSystem","kNimble","kSQL","kOracle","kExchange","kAD","kView","kO365","kHyperFlex","kKubernetes","kCassandra","kMongoDB","kCouchbase","kHdfs","kHive","kHBase","kUDA","kSfdc"] Environment *string `json:"environment,omitempty"` + + // Specifies the string based Id for an object and also provides the history of ids assigned to the object + EntityID *ObjectStringIdentifier `json:"entityId,omitempty"` } // Validate validates this object identifier @@ -47,6 +50,10 @@ func (m *ObjectIdentifier) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateEntityID(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -194,8 +201,57 @@ func (m *ObjectIdentifier) validateEnvironment(formats strfmt.Registry) error { return nil } -// ContextValidate validates this object identifier based on context it is used +func (m *ObjectIdentifier) validateEntityID(formats strfmt.Registry) error { + if swag.IsZero(m.EntityID) { // not required + return nil + } + + if m.EntityID != nil { + if err := m.EntityID.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("entityId") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("entityId") + } + return err + } + } + + return nil +} + +// ContextValidate validate this object identifier based on the context it is used func (m *ObjectIdentifier) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateEntityID(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ObjectIdentifier) contextValidateEntityID(ctx context.Context, formats strfmt.Registry) error { + + if m.EntityID != nil { + + if swag.IsZero(m.EntityID) { // not required + return nil + } + + if err := m.EntityID.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("entityId") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("entityId") + } + return err + } + } + return nil } diff --git a/v2/models/object_run_list.go b/v2/models/object_run_list.go new file mode 100644 index 00000000..956dc93b --- /dev/null +++ b/v2/models/object_run_list.go @@ -0,0 +1,91 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// ObjectRunList The response object containing the object summary, a run start time and an error message (if any) pertaining to the edit op of the run +// +// swagger:model ObjectRunList +type ObjectRunList struct { + + // Specifies the id of the object. + // Required: true + ObjectID *int64 `json:"objectId"` + + // Specifies the start time of the run that was updated. + // Required: true + RunStartTimeUsecs *int64 `json:"runStartTimeUsecs"` + + // Specifies an error (if any) corresponding to this objectId and run. + ErrorMessage string `json:"errorMessage,omitempty"` +} + +// Validate validates this object run list +func (m *ObjectRunList) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateObjectID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRunStartTimeUsecs(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ObjectRunList) validateObjectID(formats strfmt.Registry) error { + + if err := validate.Required("objectId", "body", m.ObjectID); err != nil { + return err + } + + return nil +} + +func (m *ObjectRunList) validateRunStartTimeUsecs(formats strfmt.Registry) error { + + if err := validate.Required("runStartTimeUsecs", "body", m.RunStartTimeUsecs); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this object run list based on context it is used +func (m *ObjectRunList) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *ObjectRunList) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ObjectRunList) UnmarshalBinary(b []byte) error { + var res ObjectRunList + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/v2/models/object_store_ciphers_resp.go b/v2/models/object_store_ciphers_resp.go index be94427d..6f832bf6 100644 --- a/v2/models/object_store_ciphers_resp.go +++ b/v2/models/object_store_ciphers_resp.go @@ -52,7 +52,7 @@ var objectStoreCiphersRespEnabledCiphersItemsEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["TLS_AES_256_GCM_SHA384","TLS_AES_128_GCM_SHA256","TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384","TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256","TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384","TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256","TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA","TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA","TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA","TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA","TLS_RSA_WITH_AES_256_GCM_SHA384","TLS_RSA_WITH_AES_128_GCM_SHA256","TLS_RSA_WITH_AES_256_CBC_SHA","TLS_RSA_WITH_AES_128_CBC_SHA"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["TLS_AES_256_GCM_SHA384","TLS_AES_128_GCM_SHA256","TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384","TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256","TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384","TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256","TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA","TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA","TLS_RSA_WITH_AES_256_GCM_SHA384","TLS_RSA_WITH_AES_128_GCM_SHA256","TLS_RSA_WITH_AES_256_CBC_SHA","TLS_RSA_WITH_AES_128_CBC_SHA"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -88,7 +88,7 @@ var objectStoreCiphersRespDisabledCiphersItemsEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["TLS_AES_256_GCM_SHA384","TLS_AES_128_GCM_SHA256","TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384","TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256","TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384","TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256","TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA","TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA","TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA","TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA","TLS_RSA_WITH_AES_256_GCM_SHA384","TLS_RSA_WITH_AES_128_GCM_SHA256","TLS_RSA_WITH_AES_256_CBC_SHA","TLS_RSA_WITH_AES_128_CBC_SHA"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["TLS_AES_256_GCM_SHA384","TLS_AES_128_GCM_SHA256","TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384","TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256","TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384","TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256","TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA","TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA","TLS_RSA_WITH_AES_256_GCM_SHA384","TLS_RSA_WITH_AES_128_GCM_SHA256","TLS_RSA_WITH_AES_256_CBC_SHA","TLS_RSA_WITH_AES_128_CBC_SHA"]`), &res); err != nil { panic(err) } for _, v := range res { diff --git a/v2/models/object_string_identifier.go b/v2/models/object_string_identifier.go new file mode 100644 index 00000000..7d1409f0 --- /dev/null +++ b/v2/models/object_string_identifier.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// ObjectStringIdentifier Specifies an ID generated to uniquely identify an entity. +// +// swagger:model ObjectStringIdentifier +type ObjectStringIdentifier struct { + + // Specifies the unique integer entity id. This is unique across one cluster. Two different Cohesity clusters may have same int_id for two different entities. + IntID *int64 `json:"intId,omitempty"` + + // Specifies the string entity id generated for the given entity. + StringIds *StringEntityIds `json:"stringIds,omitempty"` +} + +// Validate validates this object string identifier +func (m *ObjectStringIdentifier) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateStringIds(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ObjectStringIdentifier) validateStringIds(formats strfmt.Registry) error { + if swag.IsZero(m.StringIds) { // not required + return nil + } + + if m.StringIds != nil { + if err := m.StringIds.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("stringIds") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("stringIds") + } + return err + } + } + + return nil +} + +// ContextValidate validate this object string identifier based on the context it is used +func (m *ObjectStringIdentifier) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateStringIds(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ObjectStringIdentifier) contextValidateStringIds(ctx context.Context, formats strfmt.Registry) error { + + if m.StringIds != nil { + + if swag.IsZero(m.StringIds) { // not required + return nil + } + + if err := m.StringIds.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("stringIds") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("stringIds") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ObjectStringIdentifier) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ObjectStringIdentifier) UnmarshalBinary(b []byte) error { + var res ObjectStringIdentifier + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/v2/models/otp_verification_state.go b/v2/models/otp_verification_state.go new file mode 100644 index 00000000..e3e9621b --- /dev/null +++ b/v2/models/otp_verification_state.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// OtpVerificationState OTP verification State +// +// # OTP verification State +// +// swagger:model OtpVerificationState +type OtpVerificationState struct { + + // OTP verification State + // Enum: ["kNotStarted","kSuccess","kFailure","kPending"] + Value string `json:"value,omitempty"` +} + +// Validate validates this otp verification state +func (m *OtpVerificationState) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateValue(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var otpVerificationStateTypeValuePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["kNotStarted","kSuccess","kFailure","kPending"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + otpVerificationStateTypeValuePropEnum = append(otpVerificationStateTypeValuePropEnum, v) + } +} + +const ( + + // OtpVerificationStateValueKNotStarted captures enum value "kNotStarted" + OtpVerificationStateValueKNotStarted string = "kNotStarted" + + // OtpVerificationStateValueKSuccess captures enum value "kSuccess" + OtpVerificationStateValueKSuccess string = "kSuccess" + + // OtpVerificationStateValueKFailure captures enum value "kFailure" + OtpVerificationStateValueKFailure string = "kFailure" + + // OtpVerificationStateValueKPending captures enum value "kPending" + OtpVerificationStateValueKPending string = "kPending" +) + +// prop value enum +func (m *OtpVerificationState) validateValueEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, otpVerificationStateTypeValuePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *OtpVerificationState) validateValue(formats strfmt.Registry) error { + if swag.IsZero(m.Value) { // not required + return nil + } + + // value enum + if err := m.validateValueEnum("value", "body", m.Value); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this otp verification state based on context it is used +func (m *OtpVerificationState) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *OtpVerificationState) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *OtpVerificationState) UnmarshalBinary(b []byte) error { + var res OtpVerificationState + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/v2/models/protection_group_runs.go b/v2/models/protection_group_runs.go index 4e67eaee..48a607c7 100644 --- a/v2/models/protection_group_runs.go +++ b/v2/models/protection_group_runs.go @@ -24,6 +24,9 @@ type ProtectionGroupRuns struct { // Specifies the count of total runs exist for the given set of filters. The number of runs in single API call are limited and this count can be used to estimate query filter values to get next set of remaining runs. Please note that this field will only be populated if startTimeUsecs or endTimeUsecs or both are specified in query parameters. TotalRuns *int32 `json:"totalRuns,omitempty"` + + // Specifies the information needed in order to support pagination. This will not be included for the last page of results. + PaginationCookie *string `json:"paginationCookie,omitempty"` } // Validate validates this protection group runs diff --git a/v2/models/protection_groups.go b/v2/models/protection_groups.go index 6240246e..385400e3 100644 --- a/v2/models/protection_groups.go +++ b/v2/models/protection_groups.go @@ -21,6 +21,9 @@ type ProtectionGroups struct { // Specifies the list of Protection Groups which were returned by the request. ProtectionGroups []*ProtectionGroup `json:"protectionGroups"` + + // Specifies the information needed in order to support pagination. This will not be included for the last page of results. + PaginationCookie *string `json:"paginationCookie,omitempty"` } // Validate validates this protection groups diff --git a/v2/models/recover_vmware_vm_new_network_config.go b/v2/models/recover_vmware_vm_new_network_config.go index 31cabb64..43a3ae8f 100644 --- a/v2/models/recover_vmware_vm_new_network_config.go +++ b/v2/models/recover_vmware_vm_new_network_config.go @@ -7,10 +7,12 @@ package models import ( "context" + "strconv" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // RecoverVmwareVMNewNetworkConfig Recover VMware VMs New Network configuration. @@ -26,6 +28,10 @@ type RecoverVmwareVMNewNetworkConfig struct { // If this is true and we are attaching to a new network entity, then the VM's MAC address will be preserved on the new network. Default value is false. PreserveMacAddress *bool `json:"preserveMacAddress,omitempty"` + // Specifies the target network mapping for each VM's network adapter. + // Min Items: 0 + Mappings []*RecoverVmwareVMNewNetworkConfigMapping `json:"mappings"` + // Specifies the network port group (i.e, either a standard switch port group or a distributed port group) that will attached to the recovered Object. This parameter is mandatory if detach network is specified as false. NetworkPortGroup *RecoveryObjectIdentifier `json:"networkPortGroup,omitempty"` } @@ -34,6 +40,10 @@ type RecoverVmwareVMNewNetworkConfig struct { func (m *RecoverVmwareVMNewNetworkConfig) Validate(formats strfmt.Registry) error { var res []error + if err := m.validateMappings(formats); err != nil { + res = append(res, err) + } + if err := m.validateNetworkPortGroup(formats); err != nil { res = append(res, err) } @@ -44,6 +54,38 @@ func (m *RecoverVmwareVMNewNetworkConfig) Validate(formats strfmt.Registry) erro return nil } +func (m *RecoverVmwareVMNewNetworkConfig) validateMappings(formats strfmt.Registry) error { + if swag.IsZero(m.Mappings) { // not required + return nil + } + + iMappingsSize := int64(len(m.Mappings)) + + if err := validate.MinItems("mappings", "body", iMappingsSize, 0); err != nil { + return err + } + + for i := 0; i < len(m.Mappings); i++ { + if swag.IsZero(m.Mappings[i]) { // not required + continue + } + + if m.Mappings[i] != nil { + if err := m.Mappings[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("mappings" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("mappings" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *RecoverVmwareVMNewNetworkConfig) validateNetworkPortGroup(formats strfmt.Registry) error { if swag.IsZero(m.NetworkPortGroup) { // not required return nil @@ -67,6 +109,10 @@ func (m *RecoverVmwareVMNewNetworkConfig) validateNetworkPortGroup(formats strfm func (m *RecoverVmwareVMNewNetworkConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error + if err := m.contextValidateMappings(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateNetworkPortGroup(ctx, formats); err != nil { res = append(res, err) } @@ -77,6 +123,31 @@ func (m *RecoverVmwareVMNewNetworkConfig) ContextValidate(ctx context.Context, f return nil } +func (m *RecoverVmwareVMNewNetworkConfig) contextValidateMappings(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Mappings); i++ { + + if m.Mappings[i] != nil { + + if swag.IsZero(m.Mappings[i]) { // not required + return nil + } + + if err := m.Mappings[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("mappings" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("mappings" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *RecoverVmwareVMNewNetworkConfig) contextValidateNetworkPortGroup(ctx context.Context, formats strfmt.Registry) error { if m.NetworkPortGroup != nil { diff --git a/v2/models/recover_vmware_vm_new_network_config_mapping.go b/v2/models/recover_vmware_vm_new_network_config_mapping.go new file mode 100644 index 00000000..b0c71a9c --- /dev/null +++ b/v2/models/recover_vmware_vm_new_network_config_mapping.go @@ -0,0 +1,222 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// RecoverVmwareVMNewNetworkConfigMapping NIC to network mapping for the VMware VMs. +// +// Specifies source VMs NIC to target network mapping for the VMware VMs being recovered. +// +// swagger:model RecoverVmwareVmNewNetworkConfigMapping +type RecoverVmwareVMNewNetworkConfigMapping struct { + + // Name of the VM's network adapter name. + NetworkAdapterName *string `json:"networkAdapterName,omitempty"` + + // Specifies whether the attached network should be left in disabled state for this mapping. Default is false. + DisableNetwork *bool `json:"disableNetwork,omitempty"` + + // Specifies whether to preserve the MAC address of the source network entity while attaching to the new target network. Default is false. + PreserveMacAddress *bool `json:"preserveMacAddress,omitempty"` + + // Specifies the VDC organization network that will be attached to the recovered VM for the given network adapter and source network entity. + OrgVdcNetwork *OrgVDCNetwork `json:"orgVdcNetwork,omitempty"` + + // Specifies the source VM's network port group (i.e, either a standard switch port group or a distributed port group or an opaque network) which is associated with specified network adapter name for which mapping is selected. + SourceNetworkEntity *RecoveryObjectIdentifier `json:"sourceNetworkEntity,omitempty"` + + // Specifies the network port group (i.e, either a standard switch port group or a distributed port group or an opaque network) that will attached as backing device on the recovered object for the given network adapter name and source network entity. + TargetNetworkEntity *RecoveryObjectIdentifier `json:"targetNetworkEntity,omitempty"` +} + +// Validate validates this recover vmware Vm new network config mapping +func (m *RecoverVmwareVMNewNetworkConfigMapping) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateOrgVdcNetwork(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSourceNetworkEntity(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTargetNetworkEntity(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *RecoverVmwareVMNewNetworkConfigMapping) validateOrgVdcNetwork(formats strfmt.Registry) error { + if swag.IsZero(m.OrgVdcNetwork) { // not required + return nil + } + + if m.OrgVdcNetwork != nil { + if err := m.OrgVdcNetwork.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("orgVdcNetwork") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("orgVdcNetwork") + } + return err + } + } + + return nil +} + +func (m *RecoverVmwareVMNewNetworkConfigMapping) validateSourceNetworkEntity(formats strfmt.Registry) error { + if swag.IsZero(m.SourceNetworkEntity) { // not required + return nil + } + + if m.SourceNetworkEntity != nil { + if err := m.SourceNetworkEntity.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("sourceNetworkEntity") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("sourceNetworkEntity") + } + return err + } + } + + return nil +} + +func (m *RecoverVmwareVMNewNetworkConfigMapping) validateTargetNetworkEntity(formats strfmt.Registry) error { + if swag.IsZero(m.TargetNetworkEntity) { // not required + return nil + } + + if m.TargetNetworkEntity != nil { + if err := m.TargetNetworkEntity.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("targetNetworkEntity") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("targetNetworkEntity") + } + return err + } + } + + return nil +} + +// ContextValidate validate this recover vmware Vm new network config mapping based on the context it is used +func (m *RecoverVmwareVMNewNetworkConfigMapping) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateOrgVdcNetwork(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateSourceNetworkEntity(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateTargetNetworkEntity(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *RecoverVmwareVMNewNetworkConfigMapping) contextValidateOrgVdcNetwork(ctx context.Context, formats strfmt.Registry) error { + + if m.OrgVdcNetwork != nil { + + if swag.IsZero(m.OrgVdcNetwork) { // not required + return nil + } + + if err := m.OrgVdcNetwork.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("orgVdcNetwork") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("orgVdcNetwork") + } + return err + } + } + + return nil +} + +func (m *RecoverVmwareVMNewNetworkConfigMapping) contextValidateSourceNetworkEntity(ctx context.Context, formats strfmt.Registry) error { + + if m.SourceNetworkEntity != nil { + + if swag.IsZero(m.SourceNetworkEntity) { // not required + return nil + } + + if err := m.SourceNetworkEntity.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("sourceNetworkEntity") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("sourceNetworkEntity") + } + return err + } + } + + return nil +} + +func (m *RecoverVmwareVMNewNetworkConfigMapping) contextValidateTargetNetworkEntity(ctx context.Context, formats strfmt.Registry) error { + + if m.TargetNetworkEntity != nil { + + if swag.IsZero(m.TargetNetworkEntity) { // not required + return nil + } + + if err := m.TargetNetworkEntity.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("targetNetworkEntity") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("targetNetworkEntity") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *RecoverVmwareVMNewNetworkConfigMapping) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *RecoverVmwareVMNewNetworkConfigMapping) UnmarshalBinary(b []byte) error { + var res RecoverVmwareVMNewNetworkConfigMapping + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/v2/models/recover_vmware_vm_params.go b/v2/models/recover_vmware_vm_params.go index a11dcf37..4d8d7b11 100644 --- a/v2/models/recover_vmware_vm_params.go +++ b/v2/models/recover_vmware_vm_params.go @@ -31,6 +31,9 @@ type RecoverVmwareVMParams struct { // Enum: ["kVMware"] TargetEnvironment *string `json:"targetEnvironment"` + // Specifies the customization for the VMs being restored. + RestoreObjectCustomizations []*RestoreObjectCustomization `json:"restoreObjectCustomizations"` + // Specifies the params for recovering to a VMware target. VmwareTargetParams *VmwareTargetParamsForRecoverVM `json:"vmwareTargetParams,omitempty"` } @@ -47,6 +50,10 @@ func (m *RecoverVmwareVMParams) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateRestoreObjectCustomizations(formats); err != nil { + res = append(res, err) + } + if err := m.validateVmwareTargetParams(formats); err != nil { res = append(res, err) } @@ -123,6 +130,32 @@ func (m *RecoverVmwareVMParams) validateTargetEnvironment(formats strfmt.Registr return nil } +func (m *RecoverVmwareVMParams) validateRestoreObjectCustomizations(formats strfmt.Registry) error { + if swag.IsZero(m.RestoreObjectCustomizations) { // not required + return nil + } + + for i := 0; i < len(m.RestoreObjectCustomizations); i++ { + if swag.IsZero(m.RestoreObjectCustomizations[i]) { // not required + continue + } + + if m.RestoreObjectCustomizations[i] != nil { + if err := m.RestoreObjectCustomizations[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("restoreObjectCustomizations" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("restoreObjectCustomizations" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *RecoverVmwareVMParams) validateVmwareTargetParams(formats strfmt.Registry) error { if swag.IsZero(m.VmwareTargetParams) { // not required return nil @@ -150,6 +183,10 @@ func (m *RecoverVmwareVMParams) ContextValidate(ctx context.Context, formats str res = append(res, err) } + if err := m.contextValidateRestoreObjectCustomizations(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateVmwareTargetParams(ctx, formats); err != nil { res = append(res, err) } @@ -185,6 +222,31 @@ func (m *RecoverVmwareVMParams) contextValidateRecoverProtectionGroupRunsParams( return nil } +func (m *RecoverVmwareVMParams) contextValidateRestoreObjectCustomizations(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.RestoreObjectCustomizations); i++ { + + if m.RestoreObjectCustomizations[i] != nil { + + if swag.IsZero(m.RestoreObjectCustomizations[i]) { // not required + return nil + } + + if err := m.RestoreObjectCustomizations[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("restoreObjectCustomizations" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("restoreObjectCustomizations" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *RecoverVmwareVMParams) contextValidateVmwareTargetParams(ctx context.Context, formats strfmt.Registry) error { if m.VmwareTargetParams != nil { diff --git a/v2/models/restore_object_customization.go b/v2/models/restore_object_customization.go new file mode 100644 index 00000000..fa564e1a --- /dev/null +++ b/v2/models/restore_object_customization.go @@ -0,0 +1,114 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// RestoreObjectCustomization VMware VM's recovery customization. +// +// Specifies the customization for the VMware VMs being restored. Example: When recovering multiple VMs, users can customize network configuration for one or more VMs. +// +// swagger:model RestoreObjectCustomization +type RestoreObjectCustomization struct { + + // Specifies the object id of the VM. + ObjectID *int64 `json:"objectId,omitempty"` + + // Specifies the customized network configuration for the VM being recovered. + NetworkConfig *RecoverVmwareVMNewSourceNetworkConfig `json:"networkConfig,omitempty"` +} + +// Validate validates this restore object customization +func (m *RestoreObjectCustomization) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateNetworkConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *RestoreObjectCustomization) validateNetworkConfig(formats strfmt.Registry) error { + if swag.IsZero(m.NetworkConfig) { // not required + return nil + } + + if m.NetworkConfig != nil { + if err := m.NetworkConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("networkConfig") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("networkConfig") + } + return err + } + } + + return nil +} + +// ContextValidate validate this restore object customization based on the context it is used +func (m *RestoreObjectCustomization) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateNetworkConfig(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *RestoreObjectCustomization) contextValidateNetworkConfig(ctx context.Context, formats strfmt.Registry) error { + + if m.NetworkConfig != nil { + + if swag.IsZero(m.NetworkConfig) { // not required + return nil + } + + if err := m.NetworkConfig.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("networkConfig") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("networkConfig") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *RestoreObjectCustomization) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *RestoreObjectCustomization) UnmarshalBinary(b []byte) error { + var res RestoreObjectCustomization + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/v2/models/s3_specific_params.go b/v2/models/s3_specific_params.go new file mode 100644 index 00000000..c5fca410 --- /dev/null +++ b/v2/models/s3_specific_params.go @@ -0,0 +1,90 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// S3SpecificParams AWS S3 source register parameters +// +// # Specifies the s3 specific parameters for source registration +// +// swagger:model S3SpecificParams +type S3SpecificParams struct { + + // Specifies the ARN for S3 bucket where inventory reports are to be stored. + // Required: true + InventoryReportBucket *string `json:"inventoryReportBucket"` + + // The inventory bucket prefix where inventory reports are to be stored. + // Required: true + InventoryReportPrefix *string `json:"inventoryReportPrefix"` +} + +// Validate validates this s3 specific params +func (m *S3SpecificParams) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateInventoryReportBucket(formats); err != nil { + res = append(res, err) + } + + if err := m.validateInventoryReportPrefix(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *S3SpecificParams) validateInventoryReportBucket(formats strfmt.Registry) error { + + if err := validate.Required("inventoryReportBucket", "body", m.InventoryReportBucket); err != nil { + return err + } + + return nil +} + +func (m *S3SpecificParams) validateInventoryReportPrefix(formats strfmt.Registry) error { + + if err := validate.Required("inventoryReportPrefix", "body", m.InventoryReportPrefix); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this s3 specific params based on context it is used +func (m *S3SpecificParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *S3SpecificParams) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *S3SpecificParams) UnmarshalBinary(b []byte) error { + var res S3SpecificParams + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/v2/models/snapshot_retention_policy.go b/v2/models/snapshot_retention_policy.go new file mode 100644 index 00000000..43c0106c --- /dev/null +++ b/v2/models/snapshot_retention_policy.go @@ -0,0 +1,58 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// SnapshotRetentionPolicy Snapshot Retention Policy struct. +// +// Describes the snapshot retention policy struct. +// +// swagger:model SnapshotRetentionPolicy +type SnapshotRetentionPolicy struct { + + // Number of days to keep the snapshot. + NumOfDaysToKeep *int64 `json:"numOfDaysToKeep,omitempty"` + + // Number of snapshot versions to keep. + NumOfVersionsToKeep *int64 `json:"numOfVersionsToKeep,omitempty"` + + // Bool to denote if the policy is suspended. + Suspended *bool `json:"suspended,omitempty"` +} + +// Validate validates this snapshot retention policy +func (m *SnapshotRetentionPolicy) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this snapshot retention policy based on context it is used +func (m *SnapshotRetentionPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *SnapshotRetentionPolicy) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *SnapshotRetentionPolicy) UnmarshalBinary(b []byte) error { + var res SnapshotRetentionPolicy + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/v2/models/snapshot_schedule_policy.go b/v2/models/snapshot_schedule_policy.go new file mode 100644 index 00000000..a12c9cd3 --- /dev/null +++ b/v2/models/snapshot_schedule_policy.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "encoding/json" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// SnapshotSchedulePolicy Snapshot Schedule Policy struct. +// +// Describes the snapshot schedule policy struct. +// +// swagger:model SnapshotSchedulePolicy +type SnapshotSchedulePolicy struct { + + // Time of the day. + Time *string `json:"time,omitempty"` + + // Time zone. + TimeZone *string `json:"timeZone,omitempty"` + + // Days of the week. + DaysOfWeek []string `json:"daysOfWeek"` + + // Days of the month. + DaysOfMonth []int32 `json:"daysOfMonth"` + + // Bool to denote if the policy is suspended. + Suspended *bool `json:"suspended,omitempty"` +} + +// Validate validates this snapshot schedule policy +func (m *SnapshotSchedulePolicy) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDaysOfWeek(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var snapshotSchedulePolicyDaysOfWeekItemsEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + snapshotSchedulePolicyDaysOfWeekItemsEnum = append(snapshotSchedulePolicyDaysOfWeekItemsEnum, v) + } +} + +func (m *SnapshotSchedulePolicy) validateDaysOfWeekItemsEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, snapshotSchedulePolicyDaysOfWeekItemsEnum, true); err != nil { + return err + } + return nil +} + +func (m *SnapshotSchedulePolicy) validateDaysOfWeek(formats strfmt.Registry) error { + if swag.IsZero(m.DaysOfWeek) { // not required + return nil + } + + for i := 0; i < len(m.DaysOfWeek); i++ { + + // value enum + if err := m.validateDaysOfWeekItemsEnum("daysOfWeek"+"."+strconv.Itoa(i), "body", m.DaysOfWeek[i]); err != nil { + return err + } + + } + + return nil +} + +// ContextValidate validates this snapshot schedule policy based on context it is used +func (m *SnapshotSchedulePolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *SnapshotSchedulePolicy) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *SnapshotSchedulePolicy) UnmarshalBinary(b []byte) error { + var res SnapshotSchedulePolicy + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/v2/models/string_entity_ids.go b/v2/models/string_entity_ids.go new file mode 100644 index 00000000..4df1c0aa --- /dev/null +++ b/v2/models/string_entity_ids.go @@ -0,0 +1,296 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// StringEntityIds Specifies the model to uniquely id an entity. This model also specifies the previous ids for a given entity. +// +// swagger:model StringEntityIds +type StringEntityIds struct { + + // Specifies the latest string entity id. This string id may or may not be same for a given entity across clusters. For version 0, the id is guaranteed to be unique across all clusters, but not same for the same entity across clusters. + LatestID *VersionInfo `json:"latestId,omitempty"` + + // Specifies all the StringIds previously assigned to this entity. Note that it doesn't contain the latest id. + PreviousIds []*VersionInfo `json:"previousIds"` + + // Specifies the latest source-generated ID for an entity. It provides the most current identifier assigned by the primary source system. + LatestSourceGeneratedIds []*EntityIdentifiers `json:"latestSourceGeneratedIds"` + + // Specifies a list of previously assigned source-generated IDs for an entity. It helps in tracking the historical identifiers that were assigned by the primary source system. This can be useful for audit trails, debugging, or migration purposes. + PreviousSourceGeneratedIds []*EntityIdentifiers `json:"previousSourceGeneratedIds"` +} + +// Validate validates this string entity ids +func (m *StringEntityIds) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLatestID(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePreviousIds(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLatestSourceGeneratedIds(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePreviousSourceGeneratedIds(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *StringEntityIds) validateLatestID(formats strfmt.Registry) error { + if swag.IsZero(m.LatestID) { // not required + return nil + } + + if m.LatestID != nil { + if err := m.LatestID.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("latestId") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("latestId") + } + return err + } + } + + return nil +} + +func (m *StringEntityIds) validatePreviousIds(formats strfmt.Registry) error { + if swag.IsZero(m.PreviousIds) { // not required + return nil + } + + for i := 0; i < len(m.PreviousIds); i++ { + if swag.IsZero(m.PreviousIds[i]) { // not required + continue + } + + if m.PreviousIds[i] != nil { + if err := m.PreviousIds[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("previousIds" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("previousIds" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *StringEntityIds) validateLatestSourceGeneratedIds(formats strfmt.Registry) error { + if swag.IsZero(m.LatestSourceGeneratedIds) { // not required + return nil + } + + for i := 0; i < len(m.LatestSourceGeneratedIds); i++ { + if swag.IsZero(m.LatestSourceGeneratedIds[i]) { // not required + continue + } + + if m.LatestSourceGeneratedIds[i] != nil { + if err := m.LatestSourceGeneratedIds[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("latestSourceGeneratedIds" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("latestSourceGeneratedIds" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *StringEntityIds) validatePreviousSourceGeneratedIds(formats strfmt.Registry) error { + if swag.IsZero(m.PreviousSourceGeneratedIds) { // not required + return nil + } + + for i := 0; i < len(m.PreviousSourceGeneratedIds); i++ { + if swag.IsZero(m.PreviousSourceGeneratedIds[i]) { // not required + continue + } + + if m.PreviousSourceGeneratedIds[i] != nil { + if err := m.PreviousSourceGeneratedIds[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("previousSourceGeneratedIds" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("previousSourceGeneratedIds" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this string entity ids based on the context it is used +func (m *StringEntityIds) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateLatestID(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidatePreviousIds(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLatestSourceGeneratedIds(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidatePreviousSourceGeneratedIds(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *StringEntityIds) contextValidateLatestID(ctx context.Context, formats strfmt.Registry) error { + + if m.LatestID != nil { + + if swag.IsZero(m.LatestID) { // not required + return nil + } + + if err := m.LatestID.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("latestId") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("latestId") + } + return err + } + } + + return nil +} + +func (m *StringEntityIds) contextValidatePreviousIds(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.PreviousIds); i++ { + + if m.PreviousIds[i] != nil { + + if swag.IsZero(m.PreviousIds[i]) { // not required + return nil + } + + if err := m.PreviousIds[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("previousIds" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("previousIds" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *StringEntityIds) contextValidateLatestSourceGeneratedIds(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.LatestSourceGeneratedIds); i++ { + + if m.LatestSourceGeneratedIds[i] != nil { + + if swag.IsZero(m.LatestSourceGeneratedIds[i]) { // not required + return nil + } + + if err := m.LatestSourceGeneratedIds[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("latestSourceGeneratedIds" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("latestSourceGeneratedIds" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *StringEntityIds) contextValidatePreviousSourceGeneratedIds(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.PreviousSourceGeneratedIds); i++ { + + if m.PreviousSourceGeneratedIds[i] != nil { + + if swag.IsZero(m.PreviousSourceGeneratedIds[i]) { // not required + return nil + } + + if err := m.PreviousSourceGeneratedIds[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("previousSourceGeneratedIds" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("previousSourceGeneratedIds" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *StringEntityIds) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *StringEntityIds) UnmarshalBinary(b []byte) error { + var res StringEntityIds + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/v2/models/support_mfa_config_info.go b/v2/models/support_mfa_config_info.go index ccde1593..547609dd 100644 --- a/v2/models/support_mfa_config_info.go +++ b/v2/models/support_mfa_config_info.go @@ -25,20 +25,28 @@ type SupportMfaConfigInfo struct { // Specifies the mechanism to receive the OTP code. // Enum: ["email","totp","salesforce"] - Environment *string `json:"mfaType,omitempty"` + MfaType *string `json:"mfaType,omitempty"` // Specifies email address of the support user. Used when MFA mode is email. Email *string `json:"email,omitempty"` // MFA code that needs to be passed when disabling MFA or changing email address when email based MFA is configured. MfaCode *string `json:"mfaCode,omitempty"` + + // Specifies the status of otp verification. + // Enum: ["kNotStarted","kSuccess","kFailure","kPending"] + OtpVerificationState *string `json:"otpVerificationState,omitempty"` } // Validate validates this support mfa config info func (m *SupportMfaConfigInfo) Validate(formats strfmt.Registry) error { var res []error - if err := m.validateEnvironment(formats); err != nil { + if err := m.validateMfaType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateOtpVerificationState(formats); err != nil { res = append(res, err) } @@ -48,7 +56,7 @@ func (m *SupportMfaConfigInfo) Validate(formats strfmt.Registry) error { return nil } -var supportMfaConfigInfoTypeEnvironmentPropEnum []interface{} +var supportMfaConfigInfoTypeMfaTypePropEnum []interface{} func init() { var res []string @@ -56,37 +64,85 @@ func init() { panic(err) } for _, v := range res { - supportMfaConfigInfoTypeEnvironmentPropEnum = append(supportMfaConfigInfoTypeEnvironmentPropEnum, v) + supportMfaConfigInfoTypeMfaTypePropEnum = append(supportMfaConfigInfoTypeMfaTypePropEnum, v) + } +} + +const ( + + // SupportMfaConfigInfoMfaTypeEmail captures enum value "email" + SupportMfaConfigInfoMfaTypeEmail string = "email" + + // SupportMfaConfigInfoMfaTypeTotp captures enum value "totp" + SupportMfaConfigInfoMfaTypeTotp string = "totp" + + // SupportMfaConfigInfoMfaTypeSalesforce captures enum value "salesforce" + SupportMfaConfigInfoMfaTypeSalesforce string = "salesforce" +) + +// prop value enum +func (m *SupportMfaConfigInfo) validateMfaTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, supportMfaConfigInfoTypeMfaTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *SupportMfaConfigInfo) validateMfaType(formats strfmt.Registry) error { + if swag.IsZero(m.MfaType) { // not required + return nil + } + + // value enum + if err := m.validateMfaTypeEnum("mfaType", "body", *m.MfaType); err != nil { + return err + } + + return nil +} + +var supportMfaConfigInfoTypeOtpVerificationStatePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["kNotStarted","kSuccess","kFailure","kPending"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + supportMfaConfigInfoTypeOtpVerificationStatePropEnum = append(supportMfaConfigInfoTypeOtpVerificationStatePropEnum, v) } } const ( - // SupportMfaConfigInfoEnvironmentEmail captures enum value "email" - SupportMfaConfigInfoEnvironmentEmail string = "email" + // SupportMfaConfigInfoOtpVerificationStateKNotStarted captures enum value "kNotStarted" + SupportMfaConfigInfoOtpVerificationStateKNotStarted string = "kNotStarted" + + // SupportMfaConfigInfoOtpVerificationStateKSuccess captures enum value "kSuccess" + SupportMfaConfigInfoOtpVerificationStateKSuccess string = "kSuccess" - // SupportMfaConfigInfoEnvironmentTotp captures enum value "totp" - SupportMfaConfigInfoEnvironmentTotp string = "totp" + // SupportMfaConfigInfoOtpVerificationStateKFailure captures enum value "kFailure" + SupportMfaConfigInfoOtpVerificationStateKFailure string = "kFailure" - // SupportMfaConfigInfoEnvironmentSalesforce captures enum value "salesforce" - SupportMfaConfigInfoEnvironmentSalesforce string = "salesforce" + // SupportMfaConfigInfoOtpVerificationStateKPending captures enum value "kPending" + SupportMfaConfigInfoOtpVerificationStateKPending string = "kPending" ) // prop value enum -func (m *SupportMfaConfigInfo) validateEnvironmentEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, supportMfaConfigInfoTypeEnvironmentPropEnum, true); err != nil { +func (m *SupportMfaConfigInfo) validateOtpVerificationStateEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, supportMfaConfigInfoTypeOtpVerificationStatePropEnum, true); err != nil { return err } return nil } -func (m *SupportMfaConfigInfo) validateEnvironment(formats strfmt.Registry) error { - if swag.IsZero(m.Environment) { // not required +func (m *SupportMfaConfigInfo) validateOtpVerificationState(formats strfmt.Registry) error { + if swag.IsZero(m.OtpVerificationState) { // not required return nil } // value enum - if err := m.validateEnvironmentEnum("mfaType", "body", *m.Environment); err != nil { + if err := m.validateOtpVerificationStateEnum("otpVerificationState", "body", *m.OtpVerificationState); err != nil { return err } diff --git a/v2/models/target_object_run.go b/v2/models/target_object_run.go new file mode 100644 index 00000000..eb988624 --- /dev/null +++ b/v2/models/target_object_run.go @@ -0,0 +1,74 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// TargetObjectRun The tuple denoting the object run to be acted upon. Here, runStartTimeUsecs is an optional param if we want to update multiple runs of the object. In this scenario, runStartTimeUsecs will be empty, and the start and end time will be populated in the UpdateObjectsRunsMetadataParams +// +// swagger:model TargetObjectRun +type TargetObjectRun struct { + + // Specifies the id of the object + // Required: true + ID *string `json:"id"` + + // Specifies the start time of the run pertaining to the object + RunStartTimeUsecs *int64 `json:"runStartTimeUsecs,omitempty"` +} + +// Validate validates this target object run +func (m *TargetObjectRun) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateID(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *TargetObjectRun) validateID(formats strfmt.Registry) error { + + if err := validate.Required("id", "body", m.ID); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this target object run based on context it is used +func (m *TargetObjectRun) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *TargetObjectRun) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *TargetObjectRun) UnmarshalBinary(b []byte) error { + var res TargetObjectRun + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/v2/models/tenant_migration_action.go b/v2/models/tenant_migration_action.go index defd81d1..2eb9dd34 100644 --- a/v2/models/tenant_migration_action.go +++ b/v2/models/tenant_migration_action.go @@ -35,6 +35,10 @@ type TenantMigrationAction struct { // Retry count for the action. If an action needs to be retried, then clients will increment action_incarnation_id and can send the same request again ActionIncarnationID *int32 `json:"actionIncarnationId,omitempty"` + // Specifies the target on which the action is performed. + // Enum: ["kNone","kSource","kDestination"] + Target *string `json:"target,omitempty"` + // Specifies the cluster service on which this action needs to be performed. // Enum: ["kMagneto","kYoda","kIcebox"] Service *string `json:"service,omitempty"` @@ -55,6 +59,10 @@ func (m *TenantMigrationAction) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateTarget(formats); err != nil { + res = append(res, err) + } + if err := m.validateService(formats); err != nil { res = append(res, err) } @@ -159,6 +167,51 @@ func (m *TenantMigrationAction) validateAction(formats strfmt.Registry) error { return nil } +var tenantMigrationActionTypeTargetPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["kNone","kSource","kDestination"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + tenantMigrationActionTypeTargetPropEnum = append(tenantMigrationActionTypeTargetPropEnum, v) + } +} + +const ( + + // TenantMigrationActionTargetKNone captures enum value "kNone" + TenantMigrationActionTargetKNone string = "kNone" + + // TenantMigrationActionTargetKSource captures enum value "kSource" + TenantMigrationActionTargetKSource string = "kSource" + + // TenantMigrationActionTargetKDestination captures enum value "kDestination" + TenantMigrationActionTargetKDestination string = "kDestination" +) + +// prop value enum +func (m *TenantMigrationAction) validateTargetEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, tenantMigrationActionTypeTargetPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *TenantMigrationAction) validateTarget(formats strfmt.Registry) error { + if swag.IsZero(m.Target) { // not required + return nil + } + + // value enum + if err := m.validateTargetEnum("target", "body", *m.Target); err != nil { + return err + } + + return nil +} + var tenantMigrationActionTypeServicePropEnum []interface{} func init() { diff --git a/v2/models/update_objects_runs_metadata_internal_params.go b/v2/models/update_objects_runs_metadata_internal_params.go new file mode 100644 index 00000000..f71c80d3 --- /dev/null +++ b/v2/models/update_objects_runs_metadata_internal_params.go @@ -0,0 +1,117 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// UpdateObjectsRunsMetadataInternalParams Specifies the params for updating one or more runs of one or more objects via the cluster's internal API +// +// swagger:model UpdateObjectsRunsMetadataInternalParams +type UpdateObjectsRunsMetadataInternalParams struct { + UpdateObjectsRunsMetadataParams + + // Tenant id associated with the incoming request + TenantID *string `json:"tenantId,omitempty"` +} + +// UnmarshalJSON unmarshals this object from a JSON structure +func (m *UpdateObjectsRunsMetadataInternalParams) UnmarshalJSON(raw []byte) error { + // AO0 + var aO0 UpdateObjectsRunsMetadataParams + if err := swag.ReadJSON(raw, &aO0); err != nil { + return err + } + m.UpdateObjectsRunsMetadataParams = aO0 + + // AO1 + var dataAO1 struct { + TenantID *string `json:"tenantId,omitempty"` + } + if err := swag.ReadJSON(raw, &dataAO1); err != nil { + return err + } + + m.TenantID = dataAO1.TenantID + + return nil +} + +// MarshalJSON marshals this object to a JSON structure +func (m UpdateObjectsRunsMetadataInternalParams) MarshalJSON() ([]byte, error) { + _parts := make([][]byte, 0, 2) + + aO0, err := swag.WriteJSON(m.UpdateObjectsRunsMetadataParams) + if err != nil { + return nil, err + } + _parts = append(_parts, aO0) + var dataAO1 struct { + TenantID *string `json:"tenantId,omitempty"` + } + + dataAO1.TenantID = m.TenantID + + jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) + if errAO1 != nil { + return nil, errAO1 + } + _parts = append(_parts, jsonDataAO1) + return swag.ConcatJSON(_parts...), nil +} + +// Validate validates this update objects runs metadata internal params +func (m *UpdateObjectsRunsMetadataInternalParams) Validate(formats strfmt.Registry) error { + var res []error + + // validation for a type composition with UpdateObjectsRunsMetadataParams + if err := m.UpdateObjectsRunsMetadataParams.Validate(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// ContextValidate validate this update objects runs metadata internal params based on the context it is used +func (m *UpdateObjectsRunsMetadataInternalParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + // validation for a type composition with UpdateObjectsRunsMetadataParams + if err := m.UpdateObjectsRunsMetadataParams.ContextValidate(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// MarshalBinary interface implementation +func (m *UpdateObjectsRunsMetadataInternalParams) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *UpdateObjectsRunsMetadataInternalParams) UnmarshalBinary(b []byte) error { + var res UpdateObjectsRunsMetadataInternalParams + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/v2/models/update_objects_runs_metadata_params.go b/v2/models/update_objects_runs_metadata_params.go new file mode 100644 index 00000000..ffb7a7df --- /dev/null +++ b/v2/models/update_objects_runs_metadata_params.go @@ -0,0 +1,466 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "encoding/json" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// UpdateObjectsRunsMetadataParams Specifies the params for updating one or more runs of one or more objects. +// +// swagger:model UpdateObjectsRunsMetadataParams +type UpdateObjectsRunsMetadataParams struct { + + // An array of objects. Each containing object id and the run start time that we want to target. + TargetObjectRuns []*TargetObjectRun `json:"targetObjectRuns"` + + // Specifies the time ranges in usecs. The start time in microseconds of the range between which the runs must be updated. The end time in microseconds of the range between which the runs must be updated. End time cannot be a future date i.e. since legal hold can be executed on a run that is already completed, we cannot enforce a rule that says to put a run that will be completed in the future in legal hold. + TimeRange *TimeRangeUsecs `json:"timeRange,omitempty"` + + // Specifies whether to retain the snapshot for legal purpose. If set to 'enable', the snapshots cannot be deleted until the retention period. Note that using this option may cause the Cluster to run out of space. This field can be set only by a User having Data Security Role. If set to 'release', the snapshots under legal hold will be released. + // Enum: ["Enable","Release"] + LegalHold *string `json:"legalHold,omitempty"` + + // Specifies the Retention period of snapshot in days, months or years to retain copied Snapshots on the target. + Retention *Retention `json:"retention,omitempty"` + + // Specifies the environment. + // Enum: ["kVMware","kHyperV","kVCD","kAzure","kGCP","kKVM","kAcropolis","kAWS","kAWSNative","kAwsS3","kAWSSnapshotManager","kRDSSnapshotManager","kAuroraSnapshotManager","kAwsRDSPostgresBackup","kAzureNative","kAzureSQL","kAzureSnapshotManager","kPhysical","kPhysicalFiles","kGPFS","kElastifile","kNetapp","kGenericNas","kIsilon","kFlashBlade","kPure","kIbmFlashSystem","kSQL","kExchange","kAD","kOracle","kView","kRemoteAdapter","kO365","kO365PublicFolders","kO365Teams","kO365Group","kO365Exchange","kO365OneDrive","kO365Sharepoint","kKubernetes","kCassandra","kMongoDB","kCouchbase","kHdfs","kHive","kHBase","kUDA","kSfdc"] + Environment string `json:"environment,omitempty"` +} + +// Validate validates this update objects runs metadata params +func (m *UpdateObjectsRunsMetadataParams) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateTargetObjectRuns(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTimeRange(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLegalHold(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRetention(formats); err != nil { + res = append(res, err) + } + + if err := m.validateEnvironment(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *UpdateObjectsRunsMetadataParams) validateTargetObjectRuns(formats strfmt.Registry) error { + if swag.IsZero(m.TargetObjectRuns) { // not required + return nil + } + + for i := 0; i < len(m.TargetObjectRuns); i++ { + if swag.IsZero(m.TargetObjectRuns[i]) { // not required + continue + } + + if m.TargetObjectRuns[i] != nil { + if err := m.TargetObjectRuns[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("targetObjectRuns" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("targetObjectRuns" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *UpdateObjectsRunsMetadataParams) validateTimeRange(formats strfmt.Registry) error { + if swag.IsZero(m.TimeRange) { // not required + return nil + } + + if m.TimeRange != nil { + if err := m.TimeRange.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("timeRange") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("timeRange") + } + return err + } + } + + return nil +} + +var updateObjectsRunsMetadataParamsTypeLegalHoldPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["Enable","Release"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + updateObjectsRunsMetadataParamsTypeLegalHoldPropEnum = append(updateObjectsRunsMetadataParamsTypeLegalHoldPropEnum, v) + } +} + +const ( + + // UpdateObjectsRunsMetadataParamsLegalHoldEnable captures enum value "Enable" + UpdateObjectsRunsMetadataParamsLegalHoldEnable string = "Enable" + + // UpdateObjectsRunsMetadataParamsLegalHoldRelease captures enum value "Release" + UpdateObjectsRunsMetadataParamsLegalHoldRelease string = "Release" +) + +// prop value enum +func (m *UpdateObjectsRunsMetadataParams) validateLegalHoldEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, updateObjectsRunsMetadataParamsTypeLegalHoldPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *UpdateObjectsRunsMetadataParams) validateLegalHold(formats strfmt.Registry) error { + if swag.IsZero(m.LegalHold) { // not required + return nil + } + + // value enum + if err := m.validateLegalHoldEnum("legalHold", "body", *m.LegalHold); err != nil { + return err + } + + return nil +} + +func (m *UpdateObjectsRunsMetadataParams) validateRetention(formats strfmt.Registry) error { + if swag.IsZero(m.Retention) { // not required + return nil + } + + if m.Retention != nil { + if err := m.Retention.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("retention") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("retention") + } + return err + } + } + + return nil +} + +var updateObjectsRunsMetadataParamsTypeEnvironmentPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["kVMware","kHyperV","kVCD","kAzure","kGCP","kKVM","kAcropolis","kAWS","kAWSNative","kAwsS3","kAWSSnapshotManager","kRDSSnapshotManager","kAuroraSnapshotManager","kAwsRDSPostgresBackup","kAzureNative","kAzureSQL","kAzureSnapshotManager","kPhysical","kPhysicalFiles","kGPFS","kElastifile","kNetapp","kGenericNas","kIsilon","kFlashBlade","kPure","kIbmFlashSystem","kSQL","kExchange","kAD","kOracle","kView","kRemoteAdapter","kO365","kO365PublicFolders","kO365Teams","kO365Group","kO365Exchange","kO365OneDrive","kO365Sharepoint","kKubernetes","kCassandra","kMongoDB","kCouchbase","kHdfs","kHive","kHBase","kUDA","kSfdc"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + updateObjectsRunsMetadataParamsTypeEnvironmentPropEnum = append(updateObjectsRunsMetadataParamsTypeEnvironmentPropEnum, v) + } +} + +const ( + + // UpdateObjectsRunsMetadataParamsEnvironmentKVMware captures enum value "kVMware" + UpdateObjectsRunsMetadataParamsEnvironmentKVMware string = "kVMware" + + // UpdateObjectsRunsMetadataParamsEnvironmentKHyperV captures enum value "kHyperV" + UpdateObjectsRunsMetadataParamsEnvironmentKHyperV string = "kHyperV" + + // UpdateObjectsRunsMetadataParamsEnvironmentKVCD captures enum value "kVCD" + UpdateObjectsRunsMetadataParamsEnvironmentKVCD string = "kVCD" + + // UpdateObjectsRunsMetadataParamsEnvironmentKAzure captures enum value "kAzure" + UpdateObjectsRunsMetadataParamsEnvironmentKAzure string = "kAzure" + + // UpdateObjectsRunsMetadataParamsEnvironmentKGCP captures enum value "kGCP" + UpdateObjectsRunsMetadataParamsEnvironmentKGCP string = "kGCP" + + // UpdateObjectsRunsMetadataParamsEnvironmentKKVM captures enum value "kKVM" + UpdateObjectsRunsMetadataParamsEnvironmentKKVM string = "kKVM" + + // UpdateObjectsRunsMetadataParamsEnvironmentKAcropolis captures enum value "kAcropolis" + UpdateObjectsRunsMetadataParamsEnvironmentKAcropolis string = "kAcropolis" + + // UpdateObjectsRunsMetadataParamsEnvironmentKAWS captures enum value "kAWS" + UpdateObjectsRunsMetadataParamsEnvironmentKAWS string = "kAWS" + + // UpdateObjectsRunsMetadataParamsEnvironmentKAWSNative captures enum value "kAWSNative" + UpdateObjectsRunsMetadataParamsEnvironmentKAWSNative string = "kAWSNative" + + // UpdateObjectsRunsMetadataParamsEnvironmentKAwsS3 captures enum value "kAwsS3" + UpdateObjectsRunsMetadataParamsEnvironmentKAwsS3 string = "kAwsS3" + + // UpdateObjectsRunsMetadataParamsEnvironmentKAWSSnapshotManager captures enum value "kAWSSnapshotManager" + UpdateObjectsRunsMetadataParamsEnvironmentKAWSSnapshotManager string = "kAWSSnapshotManager" + + // UpdateObjectsRunsMetadataParamsEnvironmentKRDSSnapshotManager captures enum value "kRDSSnapshotManager" + UpdateObjectsRunsMetadataParamsEnvironmentKRDSSnapshotManager string = "kRDSSnapshotManager" + + // UpdateObjectsRunsMetadataParamsEnvironmentKAuroraSnapshotManager captures enum value "kAuroraSnapshotManager" + UpdateObjectsRunsMetadataParamsEnvironmentKAuroraSnapshotManager string = "kAuroraSnapshotManager" + + // UpdateObjectsRunsMetadataParamsEnvironmentKAwsRDSPostgresBackup captures enum value "kAwsRDSPostgresBackup" + UpdateObjectsRunsMetadataParamsEnvironmentKAwsRDSPostgresBackup string = "kAwsRDSPostgresBackup" + + // UpdateObjectsRunsMetadataParamsEnvironmentKAzureNative captures enum value "kAzureNative" + UpdateObjectsRunsMetadataParamsEnvironmentKAzureNative string = "kAzureNative" + + // UpdateObjectsRunsMetadataParamsEnvironmentKAzureSQL captures enum value "kAzureSQL" + UpdateObjectsRunsMetadataParamsEnvironmentKAzureSQL string = "kAzureSQL" + + // UpdateObjectsRunsMetadataParamsEnvironmentKAzureSnapshotManager captures enum value "kAzureSnapshotManager" + UpdateObjectsRunsMetadataParamsEnvironmentKAzureSnapshotManager string = "kAzureSnapshotManager" + + // UpdateObjectsRunsMetadataParamsEnvironmentKPhysical captures enum value "kPhysical" + UpdateObjectsRunsMetadataParamsEnvironmentKPhysical string = "kPhysical" + + // UpdateObjectsRunsMetadataParamsEnvironmentKPhysicalFiles captures enum value "kPhysicalFiles" + UpdateObjectsRunsMetadataParamsEnvironmentKPhysicalFiles string = "kPhysicalFiles" + + // UpdateObjectsRunsMetadataParamsEnvironmentKGPFS captures enum value "kGPFS" + UpdateObjectsRunsMetadataParamsEnvironmentKGPFS string = "kGPFS" + + // UpdateObjectsRunsMetadataParamsEnvironmentKElastifile captures enum value "kElastifile" + UpdateObjectsRunsMetadataParamsEnvironmentKElastifile string = "kElastifile" + + // UpdateObjectsRunsMetadataParamsEnvironmentKNetapp captures enum value "kNetapp" + UpdateObjectsRunsMetadataParamsEnvironmentKNetapp string = "kNetapp" + + // UpdateObjectsRunsMetadataParamsEnvironmentKGenericNas captures enum value "kGenericNas" + UpdateObjectsRunsMetadataParamsEnvironmentKGenericNas string = "kGenericNas" + + // UpdateObjectsRunsMetadataParamsEnvironmentKIsilon captures enum value "kIsilon" + UpdateObjectsRunsMetadataParamsEnvironmentKIsilon string = "kIsilon" + + // UpdateObjectsRunsMetadataParamsEnvironmentKFlashBlade captures enum value "kFlashBlade" + UpdateObjectsRunsMetadataParamsEnvironmentKFlashBlade string = "kFlashBlade" + + // UpdateObjectsRunsMetadataParamsEnvironmentKPure captures enum value "kPure" + UpdateObjectsRunsMetadataParamsEnvironmentKPure string = "kPure" + + // UpdateObjectsRunsMetadataParamsEnvironmentKIbmFlashSystem captures enum value "kIbmFlashSystem" + UpdateObjectsRunsMetadataParamsEnvironmentKIbmFlashSystem string = "kIbmFlashSystem" + + // UpdateObjectsRunsMetadataParamsEnvironmentKSQL captures enum value "kSQL" + UpdateObjectsRunsMetadataParamsEnvironmentKSQL string = "kSQL" + + // UpdateObjectsRunsMetadataParamsEnvironmentKExchange captures enum value "kExchange" + UpdateObjectsRunsMetadataParamsEnvironmentKExchange string = "kExchange" + + // UpdateObjectsRunsMetadataParamsEnvironmentKAD captures enum value "kAD" + UpdateObjectsRunsMetadataParamsEnvironmentKAD string = "kAD" + + // UpdateObjectsRunsMetadataParamsEnvironmentKOracle captures enum value "kOracle" + UpdateObjectsRunsMetadataParamsEnvironmentKOracle string = "kOracle" + + // UpdateObjectsRunsMetadataParamsEnvironmentKView captures enum value "kView" + UpdateObjectsRunsMetadataParamsEnvironmentKView string = "kView" + + // UpdateObjectsRunsMetadataParamsEnvironmentKRemoteAdapter captures enum value "kRemoteAdapter" + UpdateObjectsRunsMetadataParamsEnvironmentKRemoteAdapter string = "kRemoteAdapter" + + // UpdateObjectsRunsMetadataParamsEnvironmentKO365 captures enum value "kO365" + UpdateObjectsRunsMetadataParamsEnvironmentKO365 string = "kO365" + + // UpdateObjectsRunsMetadataParamsEnvironmentKO365PublicFolders captures enum value "kO365PublicFolders" + UpdateObjectsRunsMetadataParamsEnvironmentKO365PublicFolders string = "kO365PublicFolders" + + // UpdateObjectsRunsMetadataParamsEnvironmentKO365Teams captures enum value "kO365Teams" + UpdateObjectsRunsMetadataParamsEnvironmentKO365Teams string = "kO365Teams" + + // UpdateObjectsRunsMetadataParamsEnvironmentKO365Group captures enum value "kO365Group" + UpdateObjectsRunsMetadataParamsEnvironmentKO365Group string = "kO365Group" + + // UpdateObjectsRunsMetadataParamsEnvironmentKO365Exchange captures enum value "kO365Exchange" + UpdateObjectsRunsMetadataParamsEnvironmentKO365Exchange string = "kO365Exchange" + + // UpdateObjectsRunsMetadataParamsEnvironmentKO365OneDrive captures enum value "kO365OneDrive" + UpdateObjectsRunsMetadataParamsEnvironmentKO365OneDrive string = "kO365OneDrive" + + // UpdateObjectsRunsMetadataParamsEnvironmentKO365Sharepoint captures enum value "kO365Sharepoint" + UpdateObjectsRunsMetadataParamsEnvironmentKO365Sharepoint string = "kO365Sharepoint" + + // UpdateObjectsRunsMetadataParamsEnvironmentKKubernetes captures enum value "kKubernetes" + UpdateObjectsRunsMetadataParamsEnvironmentKKubernetes string = "kKubernetes" + + // UpdateObjectsRunsMetadataParamsEnvironmentKCassandra captures enum value "kCassandra" + UpdateObjectsRunsMetadataParamsEnvironmentKCassandra string = "kCassandra" + + // UpdateObjectsRunsMetadataParamsEnvironmentKMongoDB captures enum value "kMongoDB" + UpdateObjectsRunsMetadataParamsEnvironmentKMongoDB string = "kMongoDB" + + // UpdateObjectsRunsMetadataParamsEnvironmentKCouchbase captures enum value "kCouchbase" + UpdateObjectsRunsMetadataParamsEnvironmentKCouchbase string = "kCouchbase" + + // UpdateObjectsRunsMetadataParamsEnvironmentKHdfs captures enum value "kHdfs" + UpdateObjectsRunsMetadataParamsEnvironmentKHdfs string = "kHdfs" + + // UpdateObjectsRunsMetadataParamsEnvironmentKHive captures enum value "kHive" + UpdateObjectsRunsMetadataParamsEnvironmentKHive string = "kHive" + + // UpdateObjectsRunsMetadataParamsEnvironmentKHBase captures enum value "kHBase" + UpdateObjectsRunsMetadataParamsEnvironmentKHBase string = "kHBase" + + // UpdateObjectsRunsMetadataParamsEnvironmentKUDA captures enum value "kUDA" + UpdateObjectsRunsMetadataParamsEnvironmentKUDA string = "kUDA" + + // UpdateObjectsRunsMetadataParamsEnvironmentKSfdc captures enum value "kSfdc" + UpdateObjectsRunsMetadataParamsEnvironmentKSfdc string = "kSfdc" +) + +// prop value enum +func (m *UpdateObjectsRunsMetadataParams) validateEnvironmentEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, updateObjectsRunsMetadataParamsTypeEnvironmentPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *UpdateObjectsRunsMetadataParams) validateEnvironment(formats strfmt.Registry) error { + if swag.IsZero(m.Environment) { // not required + return nil + } + + // value enum + if err := m.validateEnvironmentEnum("environment", "body", m.Environment); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this update objects runs metadata params based on the context it is used +func (m *UpdateObjectsRunsMetadataParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateTargetObjectRuns(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateTimeRange(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateRetention(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *UpdateObjectsRunsMetadataParams) contextValidateTargetObjectRuns(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.TargetObjectRuns); i++ { + + if m.TargetObjectRuns[i] != nil { + + if swag.IsZero(m.TargetObjectRuns[i]) { // not required + return nil + } + + if err := m.TargetObjectRuns[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("targetObjectRuns" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("targetObjectRuns" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *UpdateObjectsRunsMetadataParams) contextValidateTimeRange(ctx context.Context, formats strfmt.Registry) error { + + if m.TimeRange != nil { + + if swag.IsZero(m.TimeRange) { // not required + return nil + } + + if err := m.TimeRange.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("timeRange") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("timeRange") + } + return err + } + } + + return nil +} + +func (m *UpdateObjectsRunsMetadataParams) contextValidateRetention(ctx context.Context, formats strfmt.Registry) error { + + if m.Retention != nil { + + if swag.IsZero(m.Retention) { // not required + return nil + } + + if err := m.Retention.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("retention") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("retention") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *UpdateObjectsRunsMetadataParams) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *UpdateObjectsRunsMetadataParams) UnmarshalBinary(b []byte) error { + var res UpdateObjectsRunsMetadataParams + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/v2/models/update_objects_runs_metadata_response.go b/v2/models/update_objects_runs_metadata_response.go new file mode 100644 index 00000000..76e32536 --- /dev/null +++ b/v2/models/update_objects_runs_metadata_response.go @@ -0,0 +1,124 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// UpdateObjectsRunsMetadataResponse The response of updating one or more runs of one or more objects in ccs +// +// swagger:model UpdateObjectsRunsMetadataResponse +type UpdateObjectsRunsMetadataResponse struct { + + // Specifies the list of objects and their protection run times mapped to errors (if any). + // Required: true + ObjectRunList []*ObjectRunList `json:"objectRunList"` +} + +// Validate validates this update objects runs metadata response +func (m *UpdateObjectsRunsMetadataResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateObjectRunList(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *UpdateObjectsRunsMetadataResponse) validateObjectRunList(formats strfmt.Registry) error { + + if err := validate.Required("objectRunList", "body", m.ObjectRunList); err != nil { + return err + } + + for i := 0; i < len(m.ObjectRunList); i++ { + if swag.IsZero(m.ObjectRunList[i]) { // not required + continue + } + + if m.ObjectRunList[i] != nil { + if err := m.ObjectRunList[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("objectRunList" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("objectRunList" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this update objects runs metadata response based on the context it is used +func (m *UpdateObjectsRunsMetadataResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateObjectRunList(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *UpdateObjectsRunsMetadataResponse) contextValidateObjectRunList(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.ObjectRunList); i++ { + + if m.ObjectRunList[i] != nil { + + if swag.IsZero(m.ObjectRunList[i]) { // not required + return nil + } + + if err := m.ObjectRunList[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("objectRunList" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("objectRunList" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *UpdateObjectsRunsMetadataResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *UpdateObjectsRunsMetadataResponse) UnmarshalBinary(b []byte) error { + var res UpdateObjectsRunsMetadataResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/v2/models/update_snapshot_policy_params.go b/v2/models/update_snapshot_policy_params.go new file mode 100644 index 00000000..9ea571a2 --- /dev/null +++ b/v2/models/update_snapshot_policy_params.go @@ -0,0 +1,73 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// UpdateSnapshotPolicyParams Snapshot Policy update request. +// +// Describes update snapshot policy request params. +// +// swagger:model UpdateSnapshotPolicyParams +type UpdateSnapshotPolicyParams struct { + + // Time of the day. + Time *string `json:"time,omitempty"` + + // Time zone. + TimeZone *string `json:"timeZone,omitempty"` + + // Days of the week. + DaysOfWeek []string `json:"daysOfWeek"` + + // Days of the month. + DaysOfMonth []int32 `json:"daysOfMonth"` + + // Suspend snapshot schedule policy. + SuspendSchedulePolicy *bool `json:"suspendSchedulePolicy,omitempty"` + + // Number of days to keep the snapshot. + NumOfDaysToKeep *int64 `json:"numOfDaysToKeep,omitempty"` + + // Number of snapshot versions to keep. + NumOfVersionsToKeep *int64 `json:"numOfVersionsToKeep,omitempty"` + + // Suspend snapshot retention policy. + SuspendRetentionPolicy *bool `json:"suspendRetentionPolicy,omitempty"` +} + +// Validate validates this update snapshot policy params +func (m *UpdateSnapshotPolicyParams) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this update snapshot policy params based on context it is used +func (m *UpdateSnapshotPolicyParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *UpdateSnapshotPolicyParams) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *UpdateSnapshotPolicyParams) UnmarshalBinary(b []byte) error { + var res UpdateSnapshotPolicyParams + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/v2/models/version_info.go b/v2/models/version_info.go new file mode 100644 index 00000000..50ec9cc0 --- /dev/null +++ b/v2/models/version_info.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// VersionInfo Version Info +// +// # Id containing the unique identifer and version +// +// swagger:model VersionInfo +type VersionInfo struct { + + // Unique identifier for the string entity. This field is used to uniquely distinguish different entities within the system. + ID *string `json:"id,omitempty"` + + // Version number associated with the string id. This can be used to track different versions of the entity id over time. The string ID assigned to the an entity may change (infrequently) across software versions. + Version *int64 `json:"version,omitempty"` +} + +// Validate validates this version info +func (m *VersionInfo) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this version info based on context it is used +func (m *VersionInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *VersionInfo) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *VersionInfo) UnmarshalBinary(b []byte) error { + var res VersionInfo + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +}